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

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

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

Post 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.
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post 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' ...
You are the creator of your destiny - Swami Vivekananda
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
pavankatra
Participant
Posts: 86
Joined: Wed Mar 03, 2010 3:09 am

Post 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.
Post Reply