in reply to How to change the language of Date value retrieved from XML file which was stored in number format using DateTime::Format::Excel module in Perl

DateTime::Format::Excel's parse_datetime returns a regular DateTime object. To format one of those, use any of the DateTime::Format:: modules. Or, for somewhat less flexible formatting, use its ->strftime() method together with ->set_locale():

use DateTime::Format::Excel; my $x=DateTime::Format::Excel->parse_datetime(41770); $x->set_locale("de_DE"); print $x->strftime('%d-%b-%Y'); # "11-Mai-2014"
  • Comment on Re: How to change the language of Date value retrieved from XML file which was stored in number format using DateTime::Format::Excel module in Perl
  • Select or Download Code