Page 1 of 1

Current date as a Parameter

Posted: Mon Mar 04, 2013 5:51 pm
by suja.somu
Can we supply current date ( todays date) as a parameter in a Parallel job.
Can I do this in Sequencer.
What are the ways to do this ?

Posted: Mon Mar 04, 2013 6:41 pm
by ray.wurlod
1. No.
2. Not in a Sequencer, but yes in a Sequence.

My preferred formula in an expression in a Sequence is to use the @DATE and @TIME system variables, but you could use Date() and Time() functions instead. Assuming that you don't want fractional seconds, a suitable formulation is

Code: Select all

Oconv(@DATE,"D-YMD[4,2,2]") : " " : Oconv(@TIME, "MTS")
or

Code: Select all

Oconv(Date(),"D-YMD[4,2,2]") : " " : Oconv(Time(), "MTS")
The difference is that the system variables are set when the Sequence starts; Date() and Time() reflect "now".

Posted: Tue Mar 05, 2013 3:02 am
by BI-RMA
And - of course - CurrentDate() and CurrentTime() (--> now) are always available as a Transformer-function in a parallel job. So they do not necessarily have to be passed to the job as a parameter.

It depends on what you need: Start-time of the job, start time of the sequence calling the job or the exact time an operation is performed within the job (for example an insert to a database).