Peoplesoft provides a function called as "DateTimeToLocalizedString" to change date from one format into another.
Following is syntax used to achiev this.
DateTimeToLocalizedString({datetime | date}, [Pattern])
Param1 : Variable of Date Datatype
Param2 : Date format which you want for example "dd/MM/yyyy".
If you have Param1 of type string then use function "DateValue" to convert that string to Date.
Title | Under | Posted on |
---|---|---|
Component interface Error: no rows exist for the specified keys | PeopleSoft Technical | 03/15/2019 - 3:54am |
ADD 24 months starting from current month.(peoplesoft) | PeopleSoft Functional | 07/29/2018 - 8:44pm |
TRC values dropdown | PeopleSoft Technical | 04/04/2018 - 12:54am |
how to find missing sequence in GRID and print the mising sequence number while saving through peoplecode | PeopleSoft Technical | 09/11/2017 - 4:49am |
Comments
Here is an example on how we can apply the above function.
%date in as 2008-08-29 out as 20080829:
%Datetime in as 2008-08-19-17.12.09.000000 out as 20080828-171209:
Give back to the community and help it grow!
* Help with unanswered forum questions and issues
* Register or login to share your knowledge at your own blog
So I have a question.
I've been trying to get the year from a date value.
&LastDateWorkedYear = &rs1(&I).TIA_VW.LAST_DATE_WORKED.Value;
&LastDateWorkedYear = Year(&LastDateWorkedYear);
I get this error:
An invalid date has been encountered in a PeopleCode program.
Are you sure that the &LastDateWorkedYear has a valid date?
Year(DATE) function will work only if the provided DATE is a vaild date format. If it is a Date time field then it wont work. Or else declare &LastDateWorkedYear as date and then try.
pls do let me know which one resolves your issue.
Regards,
Hari.A