Hi All,
I am validating a date using isValid function,I am getting an error when the date is invalid.
The input date format is dd/mm/yyyy
The function used is IsValid("DATE", StringToDate(DSLink3.Date,"%dd/%mm/%yyyy")
Now if the date is 32/32/2008 or 00/00/0000 then it gives a warning
:"Conversion error calling conversion routine date_from_string data may have been lost"
Please suggest me why this warning is getting and how to validate if it is invalid.
Thanks in advance
Regards,
Rafidwh
Error while checking date
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 137
- Joined: Sun Jan 07, 2007 11:17 pm
- Location: VISAKHAPATNAM
-
- Participant
- Posts: 137
- Joined: Sun Jan 07, 2007 11:17 pm
- Location: VISAKHAPATNAM
Please Do NullHandling In stage variable and then go ahead with validation:
like:
If Trim(DSLink3.Date) = '' then 0
else If StringToDate(Trim(DSLink3.Date),"%dd/%mm/%yy")[1,2]= '**'
Then 0
else 1
like:
If Trim(DSLink3.Date) = '' then 0
else If StringToDate(Trim(DSLink3.Date),"%dd/%mm/%yy")[1,2]= '**'
Then 0
else 1
rafidwh wrote:Getting the same warning
Conversion error calling conversion routine date_from_string data may have been lost
Shivaranjani
-
- Participant
- Posts: 137
- Joined: Sun Jan 07, 2007 11:17 pm
- Location: VISAKHAPATNAM
If IsNull(DSLink3.Date) then 0
else If StringToDate(Trim(DSLink3.Date),"%dd/%mm/%yy")[1,2]= '**'
Then 0
else 1
else If StringToDate(Trim(DSLink3.Date),"%dd/%mm/%yy")[1,2]= '**'
Then 0
else 1
G SHIVARANJANI wrote:Please Do NullHandling In stage variable and then go ahead with validation:
like:
If Trim(DSLink3.Date) = '' then 0
else If StringToDate(Trim(DSLink3.Date),"%dd/%mm/%yy")[1,2]= '**'
Then 0
else 1
rafidwh wrote:Getting the same warning
Conversion error calling conversion routine date_from_string data may have been lost
Shivaranjani