ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

file attributes

How can I get the file attributes using labview 2013 professional. I need the time and date for the last modify or last save. I found an example but the hour is not correct.

0 Kudos
Message 1 of 7
(3,663 Views)

Sounds like you're getting the attributes fine and just need to make a timezone adjustment.

Is that the case?

Message 2 of 7
(3,653 Views)

That sounds like a Daylight Savings Time or Time Zone issue.

 

Are you trying to look at files that were saved on a different machine?  I have seen this when the DST or the Time Zone on the two machines were setup different.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 7
(3,648 Views)

I think that is what the problem is, the time is in UTC and my files were saved in local time which is Eastern standard time or daylight saving time. so, I tried to use a format date/time string module to fix that but I'm getting today's date and time.

0 Kudos
Message 4 of 7
(3,640 Views)

I have attached the sample vi, how do I convert from UTC to EST? I am very new to Labview but am learning by jumping in. thanks for your help.

0 Kudos
Message 5 of 7
(3,628 Views)

Look at the Date/Time to Seconds function in the Timing palette.  It accepts a fancy cluster that you will need to build.  But it also has an input to specify if the cluster is UTC time.  Set that to TRUE and you will have a timestamp based on your local time.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 7
(3,585 Views)

thanks, i did as you suggested, had to unbundle reverse the order and convert the u16 to I32 format and rebundle before going into the date/time to seconds function. now i get what i am looking for.

0 Kudos
Message 7 of 7
(3,567 Views)