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
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
Hi, use dateadd()
:
dateadd(hour, 1, candidat_rendezvous_date)
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
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
It's working like this :
DATEADD(hour; 1; dbo.candidat_rendezvous.candidat_rendezvous_date)
Thanks
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.