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
Read Only Archives
Cloverleaf
Cloverleaf
Julain Date formatting
System
Originally posted by gricelda lopez
Hello
I am trying to format a header line for a output file. I am using tcl code for this job. I have an if statement where it checks the Julian day and if it
Find more posts tagged with
Clovertech
Comments
System
Originally posted by bill bearden
Hello Gricelda,
I think clock format isn't expecting a Julian date.
If juldt_int has a Julian date in it, try changing this line near the end of your script
set juldt_str [clock format $juldt_int -format "%Y%m%d"]
to something like
set juldt_str [clock format [clock scan $juldt_int -format "%J"] -format "%Y%m%d"]
Good luck
System
Originally posted by gricelda lopez
Hi Bill,
I tried your suggestion and it still didn't work. I got the below error message:
[0:TEST] Tcl error:
msgId = message0
proc = 'tps_northern_trust'
args = ''
result = 'bad switch "-format": must be -base or -gmt'
errorInfo: '
bad switch "-format": must be -base or -gmt
while executing
"clock scan $juldt_int -format "%j""
thank you
System
Originally posted by gricelda lopez
I found another way to add the days. Instead of using the julian date I am just adding days to my IF statement. So far it works, I will need to test it out a little more using different dates but so far so good.
Tom Rioux
Gricelda,
Try something like this:
(Using the given date of today = 20140416. Adjust to how you need it)
set julian_dt [clock format [clock seconds] -format "%j"]
set day_of_wk [clock format [clock seconds] -format "%a"]
if {[string equal $day_of_wk "FRI"]} {
set future_dt [clock scan "$julian_dt 2 day"]
} else if { .....(continue with rest of code
}
set new_date [clock format $future_dt -format %Y%m%d]
Hope this works for you!
Tom Rioux