The data which has been entered into excel file is stored as an XML file in one of my tools.
During the XML file storage process, the date value is stored in number format.
For Ex: 11-May-2014 ==> 41770. I don't know how it is stored the date value in number format.
Now, I am trying to retrieve the date value which was stored in the XML file using "DateTime::Format::Excel" module. The code snippet is attached below,
Could anyone please tell me, how to change the language (English, French, German, etc.,) of the date value printed. But, i need the format should be "DD-Abbreviated Month Name-YYYY"
use DateTime::Format::Excel;
use Date::Simple qw(d8);
use XML::Simple;
use String::Util("trim");
$RequiredValue = "%XML_FILE_ABSOLUTE_PATH%";
$XmlHandle = XMLin($RequiredValue, SuppressEmpty => 1);
$temp = trim($XmlHandle -> {Date});
$DateVal = DateTime::Format::Excel -> parse_datetime($temp) -> ymd();
$DateVal =~ s/-//g;
print (d8($DateVal)->format("%d-%b-%Y"));