0

I need to add un hour to my date, how can i do???

This my code
CASE WHEN candidat_rendezvous_date IS NOT NULL THEN 'candidat_rendezvous_date + 1Hour' END

Thanks for your help

2
Contributors
4
Replies
10
Views
3 Years
Discussion Span
Last Post by grafic.web
0

I tryed this one , but i does not work :

CASE WHEN candidat_rendezvous_date IS NOT NULL THEN dateadd('hour. 1, candidat_rendezvous_date') END

0

Without the quotes and replace the dot with a comma, dateadd() takes three arguments the format, the integer to add and the date, currently it is like you are passing only the first argument because the quotes will submit it as a single string. So change it like this:

CASE WHEN candidat_rendezvous_date IS NOT NULL THEN dateadd(hour, 1, candidat_rendezvous_date) END
0

It's working like this :
DATEADD(hour; 1; dbo.candidat_rendezvous.candidat_rendezvous_date)

Thanks

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.