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

Getting a new Timestamp

Hello all,
 
I'd like to hear opinions on this one.
 
I have a table including one timestamp (e.g. 11/29/2022 11:48:35 AM, type Date/Time), and one lapse of time in decimal minutes (e.g. 3.61 minutes, type Decimal number). The timestamp is the end of an event, and I need to find the timestamp where that event *started*. So basically I'd need to somehow get the time from the timestamp (11:48:35), substract timelapse (3.61 minutes, converted to 3:37) to get a new column with a new timestamp stating the beginning of that timelapse (which in this example should be 11:44:58).
 
How would one accomplish that?
3 REPLIES 3
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Anonymous
Not applicable

Kevin_CS_0-1669814783669.png

Here is a sample. Again, first column is type date/time, second is decimal number. I would need to generate a third column containing another timestamp where the value is the first one minus the second one. E.g. for the first line in this table, the result would be 6/17/2022 1:42:51 (which is 1:49 minus 6 minutes 9 seconds).

 

Thanks again.

Anonymous
Not applicable

Replying to myself: I converted the second column to type duration, and put it in a new column. The results seem to be correct for amount of seconds (i.e. 6.16405 is returned as 369.843). I then extracted the time of the first column, and substracted the duration. The results I got were wildly inaccurate; some instances somehow interpreted substracting around 240 seconds to extracting almost a full hour, while others showed extracting 129 seconds gave as result something around 4 hours before the original time. I'm not sure I understand why.

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.