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
is there a way to verify that a date is in the right format?
System
Originally posted by Rick Pritchett
here is what i have so far. I am wanting to add input checking so that the equations dont tank the messages if given junk input.
proc Age_Calc {} {
Find more posts tagged with
Clovertech
Comments
System
Originally posted by Rick Pritchett
i may have found my own solution but would welcome input.
jcobane1
Rickey,
Along with your "string is digit" check, you could incorporate a valid date check with the "catch" and "clock scan" command to determine if you have a real date; i.e.
if {[catch {clock scan $DOB_n}]} {
echo "If I'm here, the date had an error"
}
Since "catch" is successful (return code 1) when it encounters an error, this would indicate that the "clock scan" command couldn't determine a date. You can also use the "clock scan" command to normalize the date to a clock value for easier calculation along with the "getclock" command.
Hope this helps.
Jim Cobane
Henry Ford Health
System
Originally posted by Rick Pritchett
thanks for your advice i was able to use the commands you suggested to come up with a better way i believe this should do what i want:
proc Age_Calc {} {