shenwei356 / csvtk

A cross-platform, efficient and practical CSV/TSV toolkit in Golang
http://bioinf.shenwei.me/csvtk
MIT License
999 stars 84 forks source link

A good utility to calculate date/time differences #213

Closed Gavin-Holt closed 2 months ago

Gavin-Holt commented 1 year ago

Hi,

I was very excited to discover CSVtk and delighted that I could create data pipelines.

However, my use-case requires me to calculate date/time intervals to see how long patients wait for surgery (hours for emergencies, days for elective surgery). I would like to append new fields with the calculations.

Does anyone know of a good utility that allows me to calculate date/time differences (on a Windows machine) in a pipeline?

Good equates to:

I guess I might need several functions:

For my current project, I have had to manually edit the source data using Excel, breaking automation - I feel dirty!

Kind Regards Gavin Holt

derekmahar commented 4 months ago

If you could run your data pipeline in Windows Subsystem for Linux or Cygwin, dateutils should meet your requirements.

Gavin-Holt commented 2 months ago

I have found other ways, thank you all.