user7431342
user7431342

Reputation: 43

Is it possible to convert milliseconds into date/time in a calculated field?

So i have a table of data from jobs that have run in the past on the server with two columns in particular that i want to focus on. These two columns are the "Moment" (Dimension in Tableau) and "Duration" (Measure in Tableau) columns. The "Moment" column saves its data as a date/time and the "Duration" column saves its data in milliseconds.

I want to be able to calculate an "End Time" by adding the Duration(Milliseconds) column to the "Moment"(Date/time) column in a calculated field. Is this possible? How could i go about converting the milliseconds into a date/time format?

Thanks

Upvotes: 0

Views: 1919

Answers (1)

VictorS
VictorS

Reputation: 231

You almost can - up to a second. Calculated fields will look like this: DATEADD('second',DIV([Duration]/1000),[Moment])

Upvotes: 1

Related Questions