validate date and populatate

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ravindrag
Participant
Posts: 40
Joined: Wed Dec 14, 2005 3:22 am

validate date and populatate

Post by ravindrag »

i have a column xxxx it is of format yyyy/mm/dd DATE datatype(8) i have to see whether it is a valid format or not and if it is valid i have to load to target TIMESTAMP(30)? how can i see if it is valid or not
mcolen
Premium Member
Premium Member
Posts: 31
Joined: Wed Aug 11, 2004 8:59 am
Location: Florida

Validate

Post by mcolen »

You could always do an Iconv and the Status() to check if it was a valid date to convert conversly if it is valid you could use an Oconv and concatenate a dummy timestamp to the end of it.
avi21st
Charter Member
Charter Member
Posts: 135
Joined: Thu May 26, 2005 10:21 am
Location: USA

Re: validate date and populatate

Post by avi21st »

ravindrag wrote:i have a column xxxx it is of format yyyy/mm/dd DATE datatype(8) i have to see whether it is a valid format or not and if it is valid i have to load to target TIMESTAMP(30)? how can i see if it is valid or not
Search the forum...there are a lot of post on this subject.
Avishek Mukherjee
Data Integration Architect
Chicago, IL, USA.
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi,
Check this function IsValid(date "%yyyy-%mm-%dd", SourceDate).
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There is no IsValid() function (unless you've written one) in server jobs.
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