Extract data from TIME OF DAY / TIME AND DATE

BNA

Member
Join Date
Sep 2003
Location
Give
Posts
117
Hi

Does any one know how to extract hour and minutes and transfer them to a seperate word(Hours in one word and Minutes in one word) from TIME OF DAY or TIME AND DATE.

Regards
Brian
 
Hello BNA;

Once you have your DT variable (Date_and_Time), all you need to do ix copy Byte 3 (hours) and Byte 4 (minutes) to any memory location you need:

DT_Variable.jpg


So, if you have defined your DT variable starting at DB10.DBX0.0, DB10.DBB3 holds the hours value, and DB10.DBB4 holds the minutes value.
Hope this helps,
Daniel Chartier
 

Similar Topics

I would like to extract data from a Bizerba is50 using WebSockets or Profinet. I currently cannot find any information on the subject, any help...
Replies
1
Views
728
Hi all - got an S7 classic Step 7 program. I have a variable that's a TIME data type it contains a value such as T#1h30m5s - how can I extract...
Replies
2
Views
2,567
Hello guys, I have made a data collector which counts how long was light on. I made it by counter which counts minutes when it is on, then...
Replies
2
Views
1,328
We are doing a proof of concept to try the following 1) get data from KepServer 2) The Data will be transformed eg: a Status code of 1 gets...
Replies
0
Views
1,215
Hi, I have a SLC 500 and connected to it via DH+ is a PanelView Plus. The PV+ has an ethernet port I'm looking for a way to get the status of...
Replies
10
Views
3,396
Back
Top Bottom