You can set your own default date conversion and display format using the syb_data_fmt() private method.
Sybase date format depends on the locale settings for the client. The default date format is based on the 'C' locale, for example, Feb 16 2012 12:07PM.
This same default locale supports several additional input formats:
2/16/2012 12:07PM
2012/02/16 12:07
2012-02-16 12:07
20120216 12:07
Use dbh->{syb_date_fmt} with a string as argument, to change the date input and output format.
Date format |
Example |
---|---|
LONG |
Nov 15 2011 11:30:11:496AM |
SHORT |
Nov 15 2011 11:30AM |
DMY4_YYYY |
Nov 15 2011 |
MDY1_YYYY |
11/15/2011 |
DMY1_YYYY |
15/11/2011 |
DMY2_YYYY |
15.11.2011 |
DMY3_YYYY |
15-11-2011 |
DMY4_YYYY |
15 November 2011 |
HMS |
11:30:11 |
LONGMS |
Nov 15 2011 11:30:33.532315PM |
The Adaptive Server Enterprise database driver for Perl supports all date and time values supported up to version 15.7.