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
add system date and time to tnx
System
Originally posted by Mason Miller
I am trying to Add the system date and time to a tnx is thier a tcl I can use to do this?
Find more posts tagged with
Clovertech
Comments
Jim Kosloskey
Mason,
If you are in an Xlate, you can use one of the preset temp variables (I think it is
@now
but check to be sure).
If you have to do this outside of an Xlate, then you will need to use Tcl.
Someone may have a proc to do specifically what you want but in essence you would use the Tcl date command with appropriate arguments to get the structure you want.
Jim Kosloskey
System
Originally posted by Mason Miller
Thanks
System
Originally posted by Craig Weldy
Mason,
Here is a xlate script I use to do this. In the Xlate, from the inbound side, just send "=currentdate" so it is obvious what the xlate line is for (xlateInVals is not used), then put this script in the preproc, and in the outbound side put in the field you want the current date to show up in.
You may need to modify the exec date command to get it in the formaty you want it to be in.
######################################################################
# Name: Get_Current_Date
# Purpose: Get the current system date and put it in the message
# UPoC type: xltp
# Args: none
# Notes: All data is presented through special variables. The initial
# upvar in this proc provides access to the required variables.
#
# This proc style only works when called from a code fragment
# within an XLT.
#
proc Get_Current_Date{} {
upvar xlateId xlateId
xlateInList xlateInList
xlateInTypes xlateInTypes
xlateInVals xlateInVals
xlateOutList xlateOutList
xlateOutTypes xlateOutTypes
xlateOutVals xlateOutVals
set currdt [exec date +20%y%m%d]
set xlateOutVals
}