cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
koneill2020
Helper II
Helper II

Formatting Date using Select Value

All,

In the below - I am trying to use the formatDate command to show the dates formatted in the general format (example: 3/29/2021 1:45 PM) as when I have the SharePoint fields Start Date and End Date in the Select  it shows them formatted as such for example: 2022-03-29T17:00:00Z and I'm trying to format them nicely - therefore what is the syntax for this that is best to accomplish what I'm trying to do: 

koneill2020_0-1648690108238.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Mira_Ghaly
Dual Super User
Dual Super User

@koneill2020 

This is the expression that you should be using, replace the format with whatever your format is and start date with the correct column names in sharepoint.

if(equals(item()?['StartDate'],null),'',formatDateTime(item()?['StartDate'],'dd-MM-yyyy'))

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

2 REPLIES 2
Mira_Ghaly
Dual Super User
Dual Super User

@koneill2020 

This is the expression that you should be using, replace the format with whatever your format is and start date with the correct column names in sharepoint.

if(equals(item()?['StartDate'],null),'',formatDateTime(item()?['StartDate'],'dd-MM-yyyy'))

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
koneill2020
Helper II
Helper II

@Mira_Ghaly Many thanks! These logic aspects like that - I always struggle with.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,672)