Date Time (timestamp) formats are an even bigger deal. Those different formats range from 1900-01-01 to 01-JAN-1900.
END_DATE FROM %Table(SPF_WORDERREC) WO The dates appear to be populated correctly from debugging the program and appear to be in the standard Oracle format DD-MON-YY When I try to do some validation in Peoplecode on these date fields e.g. END_DATE U have to use wrappers like %Datein(), %Dateout() for converting the date from database format to what peoplecode understands.
When you populate a date/time state field in a %Select, you still have to use an "Out" wrapper to get the value into the standard format.
But when you reference this state field in a %Bind, Application Engine automatically provides the "In" wrapper around the substituted literal or bind marker (the latter if reuse is in effect).
Hi All, can any body tell me how to change format of the date to 'yymmdd' in people code.
this i can achieve in sqr by using edit()there any built in function in peoplecode to change the date format.
Similar to the article on date and time in People Code this article covers working with date and time in Meta-SQL.
There is also another way to set a date to null via People Code! Getting time in the format HHMMSS from the current time: This takes the time part of the current date time on the application server, replaces the dot (.) seperators with blanks, and returns only the first 6 characters (hhmmss) ignoring the millisecond part. I used this in an application to rename a file with a date & time stamp.
In some cases, using Set Default() to blank out a field is not what we're after, as there may be a default for the field!
Value will throw Syntax errors in App Designer when you try to assign the date field to "" and save your program.
I am trying to read in date fields straight from an application engine programe and perform Peoplecode checks against these dates. In an Application Engine program, things are different.
In People Code (SQLExecs and the like), the developer must use both an "Out" wrapper when selecting a date/time value into memory, as well as an "In" wrapper when referencing the value as a bind variable.