Format Date Field in Project Server 2016 /2019 Project Details Page (PDP)

display date without time in PDP Project Server 2016 2019

In this post, we will learn how to format Enterprise Custom Date Field to show only the date value without time format in Project Details Page (PDP) in Project Server 2019 / 2016 / 2013.

remove time from date in PDP in Project Server
Format Date Field in Project Server 2016

How to format Date in Project Server Details Page?

In Project Server 2016 / 2013, If you have tried to create a new enterprise custom field with a date as a data type, you will note that there is no setting to customize the date field format as you prefer!

format date field in Project server 2016

So if you have tried to add this newly created date field to a Project Details Page PDP, you will note that it’s shown by default as date only format in the New Mode and I think it’s acceptable for most of all.

show date only in PDP in Project Server 2016

But unfortunately, you will also note that the date field is displayed with date and time format in PDP View and Edit Mode that may be not acceptable as shown below:

PDP View Mode

remove time from date in PDP in Project Server

PDP Edit Mode

show date only in PDP edit mode in Project Server 2016

How to Show Date Only in PDP in Project Server 2016 / 2019?

So How we can format the date field in the Project Details Page in Project Server? Actually, I can confirm that there is no such OOTB setting to customize the Enterprise Custom date field format to a specific date format in PDP. However, JQuery and JavaScript custom code might be a good workaround solution to show date without time in Project Details Page in View and Edit Mode.

Steps

  1. Download the simple JS script from GitHub.
  2. Open your Project Center > Click on Specific Project > from the left side, Click on the PDP name.
Open Project Details Page in Project Server
  1. Click on F12 to open developer tools.
  2. Inspect the Date field to get the Date field GUID as shown below.
Get field GUID in Project Server
  1. Replace your Date field GUID for the corresponding GUID in the download script.
format date field in edit pdp in Project Server 2016
  1. Edit your Page > Add Script Editor.
add script editor in Project Server
  1. Add the new JS script with your own GUID modification.
  2. Stop Page Editing.
  3. Try now to open the PDP in View Mode, you will note that the Date field is displayed in date-only format as shown below.
show date without time in PDP view
  1. Now edit your project. Great, the Date field is also shown in date-only format in PDP Edit Mode as shown below.
show date without time in PDP edit mode

You might also like to read Project Server 2016: Remove Project Name Description in PDP

How to change the date format in the Project Center?

In the above section, we have learned how to show the date field without a time format in PDP.

show date without time in PDP view

In this section, we will show how to display the date field in “Date and Time” format or “Date-Only” format (The default setting) in Project Center 2016 / 2013.

show date field in date time in Project Server

In Project Center, to show or hide Time part for a Date field, you can simply do the following:

Steps

  1. Open PWA Site > Click on Projects to Open Project Center.
  2. At the above ribbon, Click on the Project tab.
  3. At the “Show / Hide” section, click on “Time with Date” to share data with the time format as shown below.
Format Date Field in Project Server 2016 /2019 Project Details Page (PDP)

How to change the date format in Project Schedule?

Again, you can show Time with date in Project Schedule in Project Server by doing the following:

Steps

  1. Open PWA Site > Click on Projects to Open Project Center.
  2. Click on a project in the Project Center to open it.
  3. From the left side, click on Project Schedule Page.
  4. From the above ribbon, click on “Options” > Check “Time with Date”.
show date and time for task schedule in Project Server 2016

Make sure that the Project is checked-In and Published to avoid the Time with Date option disabled.

How to change the date format in the Project Site Summary Task?

In Project Site, you can also customize Task Date format and change the date as you prefer by doing the following:

Steps

  1. Open Project Site.
  2. In the home Page, Click on the Project Site Summary web part.
  3. At the above ribbon
date format in Project Server

Conclusion

There are no OOTB settings to format Enterprise Custom Date Field in Project Server, so if you have added a date field to your PDP, it will be shown with the default date format (Date with Time) in the PDP View and Edit Mode.

So that, In this article, we have explained how to use JQuery to customize Date format and show date without time in Project Details Page (View/Edit Mode).

Applies To
  • Project Server 2019.
  • Project Server 2016.
  • Project Server 2013.
  • Project Online.
Download

Download the JS script to format date in PDP at GitHub, ad please don’t forget to follow me to get the latest updates.

See Also

2 thoughts on “Format Date Field in Project Server 2016 /2019 Project Details Page (PDP)”

Leave a Reply