dateDiff not returning hours when setting date part to 'HH'

0

While trying to find the difference in hours between two timestamps, i am receiving zero's for all results.

  • first calculation attempted & results: datediff({ride_winning_eta_submitted_time},{ride_status_to_pickup_at}) |Date 1| Date 2 | time diff in hours| | Aug 21, 2022 11pm | Aug 21, 2022 12 am | 0 | | Aug 21, 2022 1pm | Aug 21, 2022 4pm | 0 |

I would expect to see the below | Aug 21, 2022 11pm | Aug 21, 2022 12 am | 1 | | Aug 21, 2022 1pm | Aug 21, 2022 4pm | 3 |

I have also tried to simply extract the hour and then subtract those values but this will not take into account multiple days between, this only works if it is all same day interactions. The last thing i tried to do that is slightly different from the above is datediff({ride_winning_eta_submitted_time},{ride_status_to_pickup_at},"HH"), then focusing on hour within the columns and this gave me the same results as above.

Thanks in advance for any help here!

posta 2 anni fa461 visualizzazioni
1 Risposta
0
Risposta accettata

I ended up figuring out what the issue was. I have to very similarly named fields and selected the non timestamp one accidentally and did not realize it.

con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande