in reply to Win32::OLE Excel how to get milliseonds from date variant?

"You can format time values in Excel to display milliseconds by using the Format Cells option and specifying hh:mm:ss.000 as the custom time format."
  • Comment on Re: Win32::OLE Excel how to get milliseonds from date variant?

Replies are listed 'Best First'.
Re^2: Win32::OLE Excel how to get milliseonds from date variant?
by cormanaz (Deacon) on Jan 26, 2024 at 15:43 UTC
    Right, you can to that in Excel. It changes how the data is displayed in the spreadsheet but the value is still stored as a variant. When you access via Win32::OLE that's what you get, and you need to use that Date() method to turn it into a usable string. So I am trying to find out what argument to that method will give YYYY-MM-DD HH:MM:SS.000 format.