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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors