12-12-2018 04:34 PM
I am trying to trying to generate a data dictionary from a cluster using XML parser. I am passing the cluster as a variant to LabVIEW's flatten to XML.
The variant timestamp goes in as:
14/08/1966 00:00:00
It comes out from the XML parser as :
<Timestamp> <Name>PatientDoB</Name> <Cluster> <Name></Name> <NumElts>4</NumElts> <I32> <Name></Name> <Val>0</Val> </I32> <I32> <Name></Name> <Val>0</Val> </I32> <I32> <Name></Name> <Val>1976050800</Val> </I32> <I32> <Name></Name> <Val>0</Val> </I32> </Cluster> </Timestamp>
How do I convert
1976050800
into year month day?
Thanks,
Seán
Solved! Go to Solution.
12-12-2018 04:52 PM - edited 12-12-2018 04:53 PM
That's the number of seconds since LabVIEW Epoch Time. You can convert this directly into a timestamp.
12-12-2018 05:01 PM
That is the number of seconds since 01/01/1904 00:00:00.00 UTC.
12-12-2018 06:16 PM
Thanks All,
In my defense I went to :
https://www.freeformatter.com/epoch-timestamp-to-date-converter.html
I was looking at Unix time! Actually, this is indefensible . Thanks again,
Seán
12-12-2018 06:17 PM
Instead of converting it to XML and parsing it, you could try using the "Data Type Parsing" functions (under the Variant palette) to gather the name, type and value etc.