Page 1 of 1

validate date and populatate

Posted: Mon Oct 09, 2006 5:45 am
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

Validate

Posted: Mon Oct 09, 2006 6:09 am
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.

Re: validate date and populatate

Posted: Mon Oct 09, 2006 6:20 am
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.

Posted: Mon Oct 09, 2006 8:54 am
by meena
Hi,
Check this function IsValid(date "%yyyy-%mm-%dd", SourceDate).

Posted: Mon Oct 09, 2006 3:29 pm
by ray.wurlod
There is no IsValid() function (unless you've written one) in server jobs.