web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Custom Format a Date Time
Power Apps
Answered

Custom Format a Date Time

(0) ShareShare
ReportReport
Posted on by 1,088

I have a date AND time field from SharePoint List Item.

I want to apply a custom format to it to shorten it.

 

So instead of "March 26th, 2020 16:25 PM" I would want "3/26 @4:25 PM"

 

I tried:

Text(ThisItem.'Next Steps Date', "[$-en-US]m/d @ hh:mm AM/PM" )
 
But it comes out as: "3/27/2001"?
 
THanks,
Terry
Categories:
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Mattw112IG 

    Try this

    Text(ThisItem.'Next Steps Date', "m/d"&" @"&"hh:mm AM/PM")

     

  • Mattw112b Profile Picture
    1,088 on at

    displays the same?

    Terry

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Strange, it works for me. Did you copy and paste the code I suggested?

     

    Dates_format using symbol.jpg

  • Mattw112b Profile Picture
    1,088 on at

    Yep, see below:

     

    Starting date from SharePoint:

    Annotation 2020-03-26 214256.png

     

    After your edit:

    Annotation 2020-03-26 214256b.png

     

     

    Terry

  • Mattw112b Profile Picture
    1,088 on at

    Not sure if this is related but this is no longer working today, was working yesterday:

    Text(
    (Value(DataCardValue5.Text) - PRBurden) / Value(DataCardValue5.Text),
    "[$-en-US].##0"
    )
     
    Used to return three places.. now only returning two??
     
    Terry
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @Mattw112IG 

    There's a comma at the end of your formula, is your Text() formula part of an If() statement? Also, is this in a gallery or a Form? If a Form, what are the relevant properties of the DataCard?

     

    For you three decimal places, try 000 instead of ##0.

  • Mattw112b Profile Picture
    1,088 on at

    Yes part of an if...

     

    On a gallery

     

    Thanks,

    Terry

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Can you share it? it maybe relevant. Seeing as the dates are mismatching I'd say the If() isn't making it to this statement.

     

    To test this theory, try putting a label in your gallery with the above code only.

  • Mattw112b Profile Picture
    1,088 on at

    When I change, just this piece of the If, it changes the format.  So I think that is happening correctly... but full is:

     

    If(
     ThisItem.'Next Steps' = "START",
     ThisItem.'Start Date',
     If(
     ThisItem.'Next Steps' = "Phone Screen" || ThisItem.'Next Steps' = "Interview" || ThisItem.'Next Steps' = "Final Interview",
     ThisItem.'Next Steps Date',
     ""
     )
    )

     

    This displays the full date and time.

     

    When I change just the line I've shown in the clips, it changes to 2001.

     

    Thanks,

    Terry 

  • Mattw112b Profile Picture
    1,088 on at

    I tried as you suggested and added a new label and it does work... weird.. 

     

    Terry

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard