DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

export Time to CSV

Solved!
Go to solution

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

0 Kudos
Message 1 of 3
(3,762 Views)
Solution
Accepted by topic author noname76

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".

0 Kudos
Message 2 of 3
(3,749 Views)

-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.

0 Kudos
Message 3 of 3
(3,739 Views)