G
Guest
Hi all,
i have to check if a value is a valid date format depending on a "format
string" the user specified. For example:
Format String: "dd/mm/yyyy"
Date Value: "01/12/2006"
Valid: Yes!
Format String: "yyyymmdd"
Date Value: "01/01/2006"
Valid: No!
Format String: "dd.mm.yyyy"
Date Value: "12/31/2006"
Valid: No!
Format String: "mm/dd/yyyy"
Date Value: "12/31/2006"
Valid: Yes!
I always have the "dd", "mm" and "yyyy" values available, i also have the
delimiter between them.
So what is the best way to check for validation?
Thanks in advance.
Thomas
i have to check if a value is a valid date format depending on a "format
string" the user specified. For example:
Format String: "dd/mm/yyyy"
Date Value: "01/12/2006"
Valid: Yes!
Format String: "yyyymmdd"
Date Value: "01/01/2006"
Valid: No!
Format String: "dd.mm.yyyy"
Date Value: "12/31/2006"
Valid: No!
Format String: "mm/dd/yyyy"
Date Value: "12/31/2006"
Valid: Yes!
I always have the "dd", "mm" and "yyyy" values available, i also have the
delimiter between them.
So what is the best way to check for validation?
Thanks in advance.
Thomas