取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 15 条)
3,931 次查看

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 项奖励
2 条消息(共 15 条)
3,926 次查看

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 项奖励
3 条消息(共 15 条)
3,917 次查看

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 项奖励
4 条消息(共 15 条)
3,896 次查看

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 项奖励
5 条消息(共 15 条)
3,849 次查看

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

0 项奖励
6 条消息(共 15 条)
3,843 次查看

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 项奖励
7 条消息(共 15 条)
3,837 次查看

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 项奖励
8 条消息(共 15 条)
3,834 次查看

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 项奖励
9 条消息(共 15 条)
3,831 次查看

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 项奖励
10 条消息(共 15 条)
3,821 次查看