RE:Dates

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
m_siddu2000
Participant
Posts: 19
Joined: Tue Aug 01, 2006 1:37 am
Location: Hyderabad

RE:Dates

Post by m_siddu2000 »

How to convert date (sql type =varchar) 01/01/06 to January 1, 2006?
Could anyone tell me, about how to do.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

I don't have access to PX, but you can convert it using database stage by TO_CHAR(SYSDATE,'Month DD,YYYY').
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use date_from_string (Modify stage) or StringToDate (Transformer stage) to convert the date into a string, supplying an approprate date format string.
Use string_from_date (Modify stage) or DateToString (Transformer stage) to convert that result into a string of the desired format, again supplying an appropriate date format string.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply