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');
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');
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us