Check whether input is of an expected date format
Posted: Thu Dec 18, 2008 3:38 pm
Hi,
I want to check whether input date field is of expected format for date fields in different files. If I pass the expected length and date format to a routine, will the below example work
I've to write the record to an error table if date validation fails.
Does IsValid function check this?
Is there any other solution?
Thanks,
Sumesh
I want to check whether input date field is of expected format for date fields in different files. If I pass the expected length and date format to a routine, will the below example work
Code: Select all
If Len(Arg1)=8 And Not(IsNull(Iconv(Arg2,'DMDY[2,2,4]'))) Then
Ans=1
End
Else
Ans=0
Does IsValid function check this?
Is there any other solution?
Thanks,
Sumesh