Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

How to display timestamp with AM and PM

Hello guys,

 

I have a calculated column named GetTime and its calculated the current timestamp. See the image below. I would like to display the value of this column in a chart and the output must be like 16:50 AM or 8:40 PM.  At this moment i only get 16:50 as value in a chart. 

 

Any suggestions?

 

 

 

 

2017-07-29 16_54_15-Zillion Insights - Power BI Desktop.png

1 ACCEPTED SOLUTION
Daniil
Kudo Kingpin
Kudo Kingpin

I'm not exactly sure about "16:50 AM" (shouldn't it be 4:50 AM?), but there are at least two ways to accomplish your goal:

 

  1. Change formatting of the column
    gettime.png
  2. Explicitly format the column as a text string:
    Gettime = FORMAT ( NOW(), "h:mm am/pm" )

If you are using a card visual, the end result is almost the same. The second approach allows you to define capitalization (am/pm or AM/PM).

View solution in original post

2 REPLIES 2
Daniil
Kudo Kingpin
Kudo Kingpin

I'm not exactly sure about "16:50 AM" (shouldn't it be 4:50 AM?), but there are at least two ways to accomplish your goal:

 

  1. Change formatting of the column
    gettime.png
  2. Explicitly format the column as a text string:
    Gettime = FORMAT ( NOW(), "h:mm am/pm" )

If you are using a card visual, the end result is almost the same. The second approach allows you to define capitalization (am/pm or AM/PM).

This is extremely helpful.  It's odd that DAX and the column version are different sets of formatting, for me it was specifically the "tt" for AM/PM in one and just plain "AM/PM" in the other.  In any event, it worked.  Thank you.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.