Hello,
We are facing strange issue.
On 'Employment' page date field (display only) is appearing as DD/MM/YYYY instead of MM/DD/YYYY.
I have checked PeopleTools > Personalisation > Locale Defaults > Date Format. But I didn't understand how to set it. (it is showing D, Y etc.)
- How to change Date display format as MM/DD/YYYY on page?
- Can we change Date display on page based on user? (i.e. diff. Date display format for diff. users)
Thank you in advance.
Regards,
Ganesh Pawar
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 |
Hi! Ganesh
In Order to change the date format through Personalization, please follow the steps given below:
1. Navigate, Root > People Tools > Personalization > Personalization Options > Search
Here, you will get the option for the different application for which you want to change the Date Format or you can also choose PPTL (People Tools) which change the Date Format in the Tools itself. Select, PPTL.
2. Now, you can see there is a Definition---> DFRMT, for the Date Format.
3. On the Top of this page and beside the Definition Tab, you will find the Format Tab, just click on this Tab.
4. Now, click on the "Set Option Default Value".
5. Change the Option Default Value as per your requirement MMDDYY and click OK.
6. Save the changes.
========================================
========================================
If you want to change the Date Format for a Specific User on specific page then you can also do this through People Coding.
You can also play with the below code with the help of %oprid, like if %oprid then the below code or w.r.t roles through "IsUserInRole" function.
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. */
-- Assign this String variable (&String) to your desired field.
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 the above resolutions will help you.
Regards
Navin Sahay
Check for User Role
A very handy PeopleCode function to check for a user role(s) and perform specific actions depending on the value returned.
Function RoleToMatch(&RoleToMatch) Returns boolean;
&bFound = False;
/*Returns an array containing all roles associated to the current user*/
&aRoles = %Roles;
/*Loop through the array*/
For &I = 1 To &aRoles.Len
&RoleName = &aRoles.Shift();
If Upper(LTrim(RTrim(&RoleName))) = Upper(LTrim(RTrim(&RoleToMatch))) Then
&bFound = True;
Break;
End-If;
End-For;
Return &bFound;
End-Function;
...and here is how to call the function
/*Note: Don't forget to declare your function before you call it*/
/* Declare variables
&aRoles is an array of string that will store roles from %roles */
Local array of string &aRoles;
Local number &I;
Local string &RoleName;
Local boolean &bFound;
/*Function Call*/
/*The role that I would like to validate if a user has is "Administrator"*/
If RoleToMatch("Administrator") Then
/*What you want to do goes here*/
End-If;
Hello friend,
How can send email using php script & how can set configuration,
I have try many times to send email using php but till now i failed to send email.
Please give me solution in this probs.
thanks
xyz friends