Date Validation

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
prasad v
Participant
Posts: 174
Joined: Mon Mar 30, 2009 2:18 am

Date Validation

Post by prasad v »

Hi

I need to validate teh date which is coming from input file in as dd/mm/yyyy. I tried reading as date datatype in Sequential format, it is giving the warning like
has import error and no default value; data: {3 0 / 0 9 / 2 0 1 1}, at offset: 264
I tried changing the datatype as Varchar, i could read data but while using Isvalid() could not check the dd/mm/yyyy format .

Could somebody suggest how t odo this?
vishal_rastogi
Participant
Posts: 47
Joined: Thu Dec 09, 2010 4:37 am

Post by vishal_rastogi »

under job properties you will find default tab
change the Date format with the one you are using
Vish
prasad v
Participant
Posts: 174
Joined: Mon Mar 30, 2009 2:18 am

Post by prasad v »

Thanks Vishal,

I am facing one more issue, while validating the date i had given date value as 04/14/2011,date as data type and ran my job, it has given warnings saying invalid value.

later on i changed the datatype as varchar and tried to capture the error using Isvalid() to avoid the warnings but could not make the date format as dd/mm/yyyy using stringtodate function.

Can we convert to date as dd/mm/yyyy format?

Here my intention is to validate the Date(dd/mm/yyyy)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes, you can do this at field level by editing the extended properties of the field in the Columns grid. Double-click on the row number in that grid, or right click anywhere in the row in the grid and choose Edit Row.
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