Julian date conversion to yyyy-mm-dd : hh-mm-ss

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

via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Post by via »

Hi dsx and vidya,
I tryed chaning the ouput data type to datetime , but there is a conflict with the string to datetime datatype. Now i am thinking of pushing this entire date+time as varchar to sqlserver and then write a stored procedure to chage it to datetime!
This is some thing that is not suggestable, any other tip is welcome,
Thanks
Via
Via
-------------------------------------
Learn all the way, as you Grow each Second
ameyvaidya
Charter Member
Charter Member
Posts: 166
Joined: Wed Mar 16, 2005 6:52 am
Location: Mumbai, India

Post by ameyvaidya »

As from what I read from searches in the same forum (Try "SQL Server datetime" with the all words match option), If you get the format right, SQl server will parse the varchar and convert it to the right datetime format. No need of a Stored Procedure.

This issue has been taken care of many times (29 as per search results).

Also if it can not be solved using the existing topics, I'd recommend adding error messages and more info about this new issue. Coz right now there is insufficient data for this new issue to make any tips/recommendations.
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Post by via »

Hi,
I finally did forced the data type to timestamp tough it is a datetime in sql, it worked:)
Thanks folks for all your help, i really appreciate your responce.

Via
Via
-------------------------------------
Learn all the way, as you Grow each Second
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Would you care to share the actual expressions you used, to save someone else this research task when they search the Forum?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
via
Premium Member
Premium Member
Posts: 118
Joined: Fri Sep 23, 2005 3:10 pm

Post by via »

Sure Ray,
As i posted in my earlyer messages, i only changed the datestage datatype to timestamp, left the sql server datatype as datetime and the rest ramain same.
Regard,
Via
Via
-------------------------------------
Learn all the way, as you Grow each Second
Post Reply