As we know, Sage X3 supports multiple date formats as per the user’s requirement. The default date format in Sage X3 is set in setup–> Parameters. The developers who want to manipulate the date field value can use the date format using 4GL script. Also, there is an inbuilt string function that can be useful for the developers to manipulate date using 4GL.
In this blog, we will see how we can manipulate date format using the “format$”string function.
New Stuff: User Restrictions on Purchase Inquiry Screen
Syntax: format$(“format required”,”Date value”)
Let’s consider an example, format$(“YYYY[-]MM[-]DD”,date$) , Here we considered.
“YYYY-MM-DD” format and “date$” function gives us the current date and we change the current date format of the system to the required format in our code.
In the above format square brackets i.e. “[ ]” are used to represent the constant value or spaces between date characters. The given date format is stored as a string in the system.
Below are some examples of the date formats with output which helps you to change the date format in 4GL script.
So by using Format$string function 4GL scripts, developers can change the date format according to the user’s requirement& also can be used in 4GL.