Answers for "compare 2 dates sql"

SQL
2

compare date in sql

WHERE DATEDIFF(my_date,'2008-11-20') >=0;
WHERE my_date >= '2008-11-20';
WHERE to_date(my_date, 'YYYY-MM-DD') >= '2008-11-20';
WHERE to_date(my_date, 'YYYY-MM-DD') >= to_date('2008-11-20', 'YYYY-MM-DD');
Posted by: Guest on April-04-2021
0

SQL server datetime compare

Pressupondo uma tabela utilizador u.

year(u.DataInicio) --> Retorna o ano
month() --> Retorna o mês
day() --> dia

Exemplo:
u.Ativo = 1 AND year(u.DataInicio)<= 2018
Posted by: Guest on October-20-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language