LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timestamp application

In my application, I have a predefined time and date format along with a time value in seconds. With these inputs, I need to display the actual time and date. How can i implement the idea? Please provide the logic.

 

Reference:

 

Date format: 1950/01/01

Time format: 00:00:00

Time value in seconds given by a 32bit register: 86461 (24*60*60 = 1day 1min 1sec)

 

If inputs are as shown, then the output to be displayed is 1950/01/02 00:01:01 

0 Kudos
Message 1 of 15
(3,396 Views)

Use a timestamp with your start date (january first 1950) and use a normal 'Add'  function with the U32, the output will be timestamp at the correct moment.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 15
(3,391 Views)

Hi,

Thanks for the reply..

 

But there is a problem in your solution. How can we represent the correct date including 30-day month, 31-day month etc...???

0 Kudos
Message 3 of 15
(3,382 Views)

Could you post your code?

To me it sounds like you didin't understande me, since the timestamp deals with the representation of the date.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 15
(3,361 Views)

Hi,

 

I dont have any code for this. I think i need to implement a calendar for this purpose. Please see the example:

 

Predefined Date : 2010/01/01

Predefined Time : 00:00:00

Register value : 5184000

 

Output timestamp value should be 2010/03/02 00:00:00

Regards,

Shiva

0 Kudos
Message 5 of 15
(3,314 Views)

You should at least try the timestamp idea. It does everything you have explained

0 Kudos
Message 6 of 15
(3,308 Views)

Hi,

 

Thanks for your reply.

 

When i change the time in the timestamp constant to 00:00:00, it automatically changes to 05:29:59. Why it is so? How can i fix the time to 00:00:00?

 

Regards,

Shiva

0 Kudos
Message 7 of 15
(3,302 Views)

It doesn't in my example. Are you using that? If you are using your own, did you change the display format to custom? To 24 hr?

0 Kudos
Message 8 of 15
(3,299 Views)

I am using your example only & not changed any settings. Right click and select Set time and date, and update the time to 00:00:00 and date to 1970/01/01. The time is changing...

0 Kudos
Message 9 of 15
(3,296 Views)

It does not do it for me. I'm actually running 2010. Or perhaps it's due to a regional setting. Vac you change the year by just typing it in the control?

0 Kudos
Message 10 of 15
(3,286 Views)