Is there a shared variable for current date?

TJ (32 posts)
November 26, 2018 12:08 PM
Accepted Answer

I will need a variable presenting current date for each job and each step? is there a factory variable I can use? Or I need to define it in each job ?

 

Thanks for help!

 

Bill Staff (599 posts)
November 27, 2018 08:43 AM
Accepted Answer

That depends a little on what you want to use the variable for and what format you need it in. See here for a list of the predefined variables. You can use Job.ExecutionStart and Step.ExecutionStart to get the start of the job or current step. These will be formatted as "yyyy-MM-dd HH:mm:ss.fff" but you can change the format as described Variable Formatting.

You can also use inline functions to get the current date/time in whatever format you want.

Replies are disabled for this topic.