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 |
Is that a field displayed on the page? I don't think there is a build in function that does that for you. But if you are pulling the date from the database then why not use %dateout.
You can also use SQLExec and to_char(date_field, 'yymmdd').
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
Thanks for your reply. actually my requirement is generating an outbound interface using application engine.
and client want the OUTPUT file name should be concatenated with sysdate in format'yymmdd'.
Every day this file has to run and the file name should be changed depending on the run date.for this to get
a sysdate i am using %Date() function but how can i change date format?
Thanks,
sudha
How about this?
SQLExec("select to_char(sysdate, 'yymmdd') from dual", &formatedDate);
and then append it to your file name as such:
&myFileName = &myFileName || "_" || &formatedDate;
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
Thank you so much for your reply
Proably this can also work even though i haven't tested it.
DateTimeToLocalizedString({datetime | date}, [Pattern])
Thanks
Nitin Bhatia
Nitin, it sure does work, here is an example on how to use the date and date time format function http://www.compshack.com/peoplecode/changing-date-format-using-peoplecod...
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
Hi! All,
There is one built-in function "DateTimeToLocalizedString". You can use this if you want to change the date format through people code for your PIA pages.
How to use:
Example 1:
&String = DateTimeToLocalizedString(&Date, "M/d/y");
/* if you are picking the date from any record field and using &Date for that field */
Example 2:
&String = DateTimeToLocalizedString(%Date, "M/d/y");
/* if you want to pick the system date and want to use it on your page with different formats. */
Note: Here 'd' for date and 'y' for year both must be in smaller letters only. And, 'M' for months should be in Caps.
I hope this will help you.
Warm Regards,
Navin Sahay
current date minus one
Hi all,
I used DateTimeToLocalizedString to convert the date format, but the variable also gets converted to string which then messes up other functionality. If i convert this string variable back to Date or Datevalue it overrides the date format and goes back to original. How can i directly change the date format without changing it to string. TO_DATE(TO_CHAR) also does not respond.