10-15-2009 10:05 AM
Hello everyone,
I wrote a script that in the end should store all data to a CSV file. Unfortunately it writes the time down as following:
08/12/2009 16:52:52.5335464
this is correct but a little uncomftable to process so I want to ask you what do i have to do so the time is written like this:
manyDigits52.5335464
or even better how do i get the time starting with 0 for the foirst measurement?
Thanks in advance
H.Wagner
Solved! Go to Solution.
10-16-2009 03:08 AM
If you set the property "displaytype" of the time channel to "numeric" instead of "time" DIAdem will export a double representing the seconds till 01.01.0000
To work on with this numbers heer are some constants
const __int64 SECONDS_1_JANUARY_1904 = 60084288000; ///<! Seconds form 01.01.0000 - 01.01.1904
const __int64 SECONDS_1_JANUARY_1970 = 62167132800; ///<! Seconds form 01.01.0000 - 01.01.1970
const __int64 SECONDS_1_JANUARY_1601 = 50522659200; ///<! Seconds form 01.01.0000 - 01.01.1601
which can be used to transform to other time bases.
After the export you can set the "displaytype" back to "time".
10-16-2009 07:35 AM
-Hello AndreasK,
thank you for your reply. This worked like a charm. For everyone else having the same issue here the ccomplete code:
Data.Root.ChannelGroups(1).Channels("Time").Properties.Item("displaytype").Value="numeric"
Thanks again
H.