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!

feita há 2 anos461 visualizações
1 Resposta
0
Resposta aceita

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.

respondido há 2 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas