cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass the current time to mii scheduler as a transaction input parameter

dan_kellackey
Explorer
0 Kudos

I would like to pass in the current time that a scheduled job runs to a transaction input parameter, endDate.  I have tried = formatdatenow(format), but get an invalid date time format error when I try to save.  I am trying to pass-in a dynamic date/time to a sql query in the transaction, so that I don't have to hard-code getDate() into the query.

Thanks,

Dan K

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Dan,

Scheduler screen does not support Functions as an input parameter.

However, there is a work around.You could set the date in the transaction itself. Use the assignment block (before the query action block) and assign the 'endDate' parameter to 'datenow' function from the function combo box.

Run the transaction in the scheduler. Leave the 'endDate' input blank. When the scheduler runs, the transaction would be executed with current date/time.

Regards,

Tufale Ashai.

dan_kellackey
Explorer
0 Kudos

Thank you for the reply.  The basic question was the use of functions in the scheduler to pass input to parameters. 

The idea of passing the sql time from the transaction is a good alternative to hard-coding the sql, which could limit it's reuse.

BR,

Dan K

Answers (0)