Page 1 of 1

how to convert 26-FEB-10 into 26/02/2010

Posted: Wed May 05, 2010 10:22 am
by pavankatra
Hi,
I ahve rewuirement like this
how to convert 26-FEB-10 into 26/02/2010

So can anyone suggest me how to do this in parallel job.

Thanks in advance.

Posted: Wed May 05, 2010 11:16 am
by anbu

Code: Select all

x=26-FEB-10
svMon=UPCASE(Field(x,"-",2))
If svMon = 'JAN' Then '01' Else If svMon = 'FEB' Then '02' ...

Posted: Wed May 05, 2010 11:46 am
by pavankatra
anbu wrote:

Code: Select all

x=26-FEB-10
svMon=UPCASE(Field(x,"-",2))
If svMon = 'JAN' Then '01' Else If svMon = 'FEB' Then '02' ...
Thanks for your reply

i will try it and let you know.

Posted: Wed May 05, 2010 4:44 pm
by ray.wurlod
Use StringToDate() to convert to binary date format, and DateToString() to convert back to desired format. Use appropriate date format strings for each function.

Posted: Thu May 06, 2010 7:27 am
by pavankatra
ray.wurlod wrote:Use StringToDate() to convert to binary date format, and DateToString() to convert back to desired format. Use appropriate date format strings for each function. ...
thanks for your reply.

problem solved.

i have created stagvariables to resolve this.

Thanks for your suggestions.