infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Cloverleaf
Adding days to date message recieved using system time tcl
System
Originally posted by Hannah Ndungu
I am trying to add days to the day the message was received, using system time. Any ideas on how to code for this?
Find more posts tagged with
Clovertech
Comments
Tipu Razaq (Clovertech)
<p>What do you mean? Are you trying to add more time to a date/time field in the message? </p>
System
Originally posted by Hannah Ndungu
Correct! Say date and time of message was 20200817142811. I would like to add 11 days to that using system time as opposed to MSH 7
Vince Angulo
I just tried this at the tcl prompt to get 3 days in the future, you can probably google better examples of clock scan to fit your exact needs:
clock format [clock scan "72 hours"] -format %Y%m%d%H%M%S
20200821122548
System
Originally posted by Hannah Ndungu
Thank you
Tipu Razaq (Clovertech)
...
Tipu Razaq (Clovertech)
Here’s the TCL command. Takes your date/time, converts it to seconds, adds 11 days, converts it back to your desired date format of %Y%m%d%H%M%S (year, month, day, hour, minutes, seconds)
This is all assuming 24 hour clocks, not 12 hr
clock format [clock add [clock scan 20200817142811 -format %Y%m%d%H%M%S] 11 days] -format %Y%m%d%H%M%S
New date/time: 20200828142811
System
Originally posted by Hannah Ndungu
Thank you