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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Remove seconds from a timestamp field

Hi Team,

 

I am new to PowerBI and hence this question might be very simple but it would be very helpful if you help me with it.

 

I have a field in my table "A_Timestamp" and the value is 

01/02/18 12:08:25

I want to ignore the seconds and display the result as

01/02/18 12:08

How can this be achieved?

 

Thank you very much in advance.

 

Regards,

Ani

1 ACCEPTED SOLUTION
Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @Anonymous

 

You can use the formatting features in the toolbar as @Anonymous suggested.

 

Another option is to use the FORMAT function that allows you to control the format string.  To convert your date you would use FORMAT( <datevalue> , "dd/MM/YY hh:mm" )


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

6 REPLIES 6
Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @Anonymous

 

You can use the formatting features in the toolbar as @Anonymous suggested.

 

Another option is to use the FORMAT function that allows you to control the format string.  To convert your date you would use FORMAT( <datevalue> , "dd/MM/YY hh:mm" )


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Thank you so much Phil_Seamark. Thanks for your quick assistance.

Easily follow this:

in quesry view: Add column > Forma> Trim> Parse

This way you'll get rid of the seconds

Anonymous
Not applicable

@Phil_Seamark  knew i missed an easy one!

Anonymous
Not applicable

If it is just for display purposes, you can select the individual column and go into the Modelling Tab on the top menu.  Under there is a Data format section whereby you can choose a format that does not display the seconds.

 

 

If you are wanting to strip out the seconds for the purpose of data comparisons, you will need to perform an operation that will 'round' the seconds.  This will depend how the data is stored, but generally time is the decimal component of the Date/Time number value.  So 0 equals midnight and 1 the following midnight, with 0.5 being mid day.  This would mean that a single minute would be (1 / 24 / 60) or (1 / 1440)

If you take the number you have, multiply it by 1440 and round to zero decimal places (integer), then divide that back by 1440 and store as a decimal, you will have rounded the number.

 

Consider how you round, as you will move the time either up or down to the nearest second.  If you want to always round down, you need to use a "Floor" operation instead.

Anonymous
Not applicable

Thank you so much Ross73312 for your assistance.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.