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
Julian Date conversion for current year
System
Originally posted by Don Anderson
Im trying to convert the julian day of the current year and havent had much luck.
i.e 20160316 YYMMDD need to be converted to 16082 YYJJJ
Any suggestions
Find more posts tagged with
Clovertech
Comments
jcobane1
Don,
If you are doing this within an Xlate and your fields are defined as the respective date formats, the engine should handle the conversion for you.
System
Originally posted by Don Anderson
I'm doing it withing a TPS sript as part of a file name requirment by the state of Texas. They insiste the file name have that format appended to the file name
System
Originally posted by Don Anderson
Im not sure how you got 76
Jan 31
Feb 29
Mar 22
=82
System
Originally posted by Don Anderson
This gave me the expected result
set TS [fmtclock [getclock] %y%m%d]
set TSJ [clock format [clock scan $TS] -format %y%j]
set fileout SHFCGALV${TSJ}.HL7
SHFCGALV16082.HL7
Texas Immunization Reporting
jcobane1
The Julian day for 3/16/2016 should be 076 (which is the date you show in your example: "20160316"), the Julian day for 3/22 (today) is 082.
Thanks,
Jim Cobane
Henry Ford Health
Charlie Bursell
Use clock command
Charlie Bursell
After reading more I am really confused as to what you want here.
You say you have input data 20160316 (YYYYMMDD) which needs to be converted to julian date.
Which one? two types of julian dates
1. A three-digit number giving the day of the year (001-366).
2. The Julian Day Number is a count of the number of calendar days that have elapsed since 1 January, 4713 BCE of the proleptic Julian calendar. The epoch time of 1 January 1970 corresponds to Julian Day Number 2440588.
#1
clock format [clock scan $dt ] -format "%j %Y"
==? 076 2016
#2
clock format [clock scan $dt ] -format "%J %y"
==> 2457464 16
Is this what you want? Adjust formatting characters to match what you need.