Convert oracle nls_date_format - strftime format strings
use Convert::NLS_DATE_FORMAT qw(oracle2posix posix2oracle); my $strptime = oracle2posix($NLS_DATE_FORMAT); $NLS_DATE_FORMAT = posix2oracle($strftime);
Convert Oracle's \s-1NLS_DATE_FORMAT\s0 string into a strptime format string, or the reverse.
Takes an Oracle \s-1NLS_DATE_FORMAT\s0 string and converts it into formatting string compatible with \*(C`strftime\*(C' or \*(C`strptime\*(C'. my $format = oracle2posix('YYYY-MM-DD HH24:MI:SS'); # '%Y-%m-%d %H:%M:%S' Character sequences that should not be translated may be enclosed within double quotes, as specified in the Oracle documentation. my $format = oracle2posix('YYYY-MM-DD"T"HH24:MI:SS'); # '%Y-%m-%dT%H:%M:%S'
Takes a \*(C`strftime\*(C' or \*(C`strptime\*(C' formatting string and converts it into an Oracle \s-1NLS_DATE_FORMAT\s0 string. It is possible to create strings which Oracle will not accept as valid \s-1NLS_DATE_FORMAT\s0 strings. my $format = posix2oracle('%Y-%m-%d %H:%M:%S'); # 'YYYY-MM-DD HH24:MI:SS'
None by default. \*(C`oracle2posix\*(C' and \*(C`posix2oracle\*(C' when asked.
DateTime::Format::Oracle.
Nathan Gray, <[email protected]>
Copyright (C) 2005, 2006, 2011, 2012 Nathan Gray
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.