3
$\begingroup$

I want to subtract the "assigned_ts" values from the "closed_ts" column and paste the results in seconds into the column with the "difference_ts" header. Dataset table

$\endgroup$

1 Answer 1

5
$\begingroup$
ds = {
   <|"assigned_ts" -> "2017-04-20 12:09:39", "closed_ts" -> "2017-04-20 13:13:01"|>,
   <|"assigned_ts" -> "2017-04-20 12:10:30", "closed_ts" -> "2017-04-20 12:28:29"|>} // Dataset

ds[All, <|#, 
   "difference_ts" -> DateDifference[DateObject[#"assigned_ts"], DateObject[#"closed_ts"], "Second"]|> &]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.