IsValid function usage

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
ds_is_fun
Premium Member
Premium Member
Posts: 194
Joined: Fri Jan 07, 2005 12:00 pm

IsValid function usage

Post by ds_is_fun »

Im trying to use IsValid function.
The dev guide says the arguments for usage is
type(string) format (string).
My input column type is - string and output column type is - string
But before I moved the data over to another stage I want to check if the input column type
could be converted to a date of format (yyyy-mm-dd) .
I tried the usage of this function but I have failed.

How do I check if the input type could be converted to a date of format yyyy-mm-dd? with the function IsValid?
Thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

I dont think IsValid() works like that. For example, if you are checking for a date coming from string, you will have to do something like

Code: Select all

IsValid(StringToDate(in.Date, "%yyyy-%mm-%dd"), "Date")
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply