I am trying to get difference between two dates in number of “days”.
I am able to substract the two date fields but results is being produced as “n days”.
As we can see below DATE_DIFF is produced after executing below logic. I would like to produce DATE_DIFF as Integer like 0, 510, 1223 etc.
df2.DATE_DIFF = (df2.dte2 - minimum(df2.dte2))
3×4 DataFrame
Row │ dte dte2 year DATE_DIFF
│ Date Date Int64 Day
─────┼──────────────────────────────────────────
1 │ 2022-01-01 2022-01-01 2022 0 days
2 │ 2023-05-26 2023-05-26 2023 510 days
3 │ 2025-05-08 2025-05-08 2025 1223 days
60 * 13 = 780 + 06 = 786 minutes, I know we can calculate 60 * 13 by parsing or splitting by “:” but just wanted to check if there is method that already does this.