Page 1 of 1

How to format current date as string in parameter

Posted: Wed Aug 31, 2011 3:36 pm
by jcook
I want to pass the current date to to a job as a parameter from the sequence. I am calling DSJobStartDate for the parameter to the job. However, I'd like to reformat this to a string in the format of 'DD-MON-YYYY'. Yet, I cannot identify a function to do this type of reformatting of the current date in the parameter expression. Is this possible and what function could I use to reformat the current date into a string?

Re: How to format current date as string in parameter

Posted: Wed Aug 31, 2011 5:20 pm
by SURA
Use routine.

DS User

Posted: Wed Aug 31, 2011 6:33 pm
by ray.wurlod

Code: Select all

Oconv(Iconv(DSJobStartDate, "DYMD"), "D-DMY[2,A3,4]")
See also this article.

Problem solved

Posted: Thu Sep 01, 2011 10:44 am
by jcook
Thanks, Ray. That fixed my problem! :D