My approach to splitting up a date into its constituent parts is a regular expression:
if( $Date !~ /^(20\d\d)([01]\d)([0123]\d)$/ ) { die "Invalid date '$Date'; } $Date = "$1-$2-$3 00:00:00.000";
In reply to Re^3: Error passing string date from Perl to MSSQL
by Corion
in thread Error passing string date from Perl to MSSQL
by JobyJ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |