If you use ADO with Perl to run database queries, datetime fields will be converted into a character representation which does not necessarily use the default style for your SQL Server installation. This will cause problems if you will be using the representation to insert back into the db.
So if $daterep contains a datetime field which has been selected from the db in this way, then
"insert into table1(datetimefield) values ('$daterep')"
may result in a conversion failure. Put an explicit conversion on the select
"select convert(datetime, datetimefield, 120) daterep"
(You could instead put a conversion on the insert, but you'd have to inspect the data and see which format it was first).
Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.
Quick
- ($a, $b....) = unpack("A2A7...", $packed)
- push( array, list )