Page 1 of 1

Date Validation

Posted: Tue Oct 04, 2011 6:16 am
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?

Posted: Tue Oct 04, 2011 7:44 am
by vishal_rastogi
under job properties you will find default tab
change the Date format with the one you are using

Posted: Tue Oct 04, 2011 9:10 am
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)

Posted: Tue Oct 04, 2011 3:04 pm
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.