DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to import Date in TDR text box from data file?

Solved!
Go to solution

I have a report template that I use frequently for plotting data from files. At the top of the TDR I have a main title text box that says "Daily Operation" usually followed by the date (typed in manually) of that file. 

 

Q: How do I import/reference the date value from the file (pic #1--outlined in black) into the text box (pic #2) I use for the Date? I appreciate any help.

Download All
0 Kudos
Message 1 of 5
(3,704 Views)

Hey Lab Guy,

 

What if you try the following in the Text Object?

 

Daily Operation: @@Data.GetChannel("[1]/Date").Values(1)@@

 

Let me know if that works for you...

Derrick S.
Product Manager
NI DIAdem
National Instruments
0 Kudos
Message 2 of 5
(3,696 Views)

Hi Derrick,

 

I copied and pasted your command, but I didn't get the result I was looking for (refer to attachment). Perhaps the data plugin I crafted isn't the best, so that may be why I can't extract that value. I'm open to trying something else if you have another idea. As this is more for convenience, I do not wish to take up too much of your time on this-but I do appreciate the help!

0 Kudos
Message 3 of 5
(3,631 Views)
Solution
Accepted by topic author Lab Guy

Hi Lab Guy,

 

Looks like you'll need to use the RTT (Real-To-Time) function, which turns the DIAdem date/time real number (fractional seconds since 0 AD) into a date/time string.  There's also a TTR function that goes the other way.

 

@@RTT(ChD(1, "[1]/Date"), "#mm/dd/yyyy hh:nn:ss.fff")@@

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 4 of 5
(3,611 Views)

That code gets the job done--thank you! The previous code will also come in handy, so thanks to you both!! I appreciate the help, gentlemen.

0 Kudos
Message 5 of 5
(3,576 Views)