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
Tcl Library
How to convert a string into specific date format ?
System
Originally posted by Ganesan Murali
How do we convert a string into specific date format ?
Input string:
20100628153744
Output should be
28-June-2010 03.37.44 PM
Pls help.?
Find more posts tagged with
Clovertech
Comments
Max Drown
Use the tcl clock command. clock has a format option.
Keith McLeod
hcitcl>set dt 20100628153744
20100628153744
hcitcl>regsub -- {(d{8})(d*)} $dt {1 2} dt
1
hcitcl>echo $dt
20100628 153744
hcitcl>clock format [clock scan $dt] -format "%d-%B-%Y %I.%M.%S %p"
28-June-2010 03.37.44 PM