Search
 
SCRIPT & CODE EXAMPLE
 

SQL

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');
Comment

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
Comment

PREVIOUS NEXT
Code Example
Sql :: Rows, INSERT INTO 
Sql :: in operator in sql 
Sql :: export data from excel to sql server 
Sql :: All Some Any 
Sql :: modificar tipo de dato sql server 
Sql :: distance calculator from lat long sql query 
Sql :: how to run sql query in mysql workbench 
Sql :: oracle temp tablespace size 
Sql :: sql multi row insert 
Sql :: convert google analytics dathourminute to time stamp? sql 
Sql :: sql int size 
Sql :: How to Remove milliseconds from Date time 
Sql :: pl sql call web service 
Sql :: raven ql select count 
Csharp :: dotnet install ef 
Csharp :: unity if in editor 
Csharp :: unity how to change rotation 
Csharp :: how to detect a mouse click in unity 
Csharp :: check if gameobject is active 
Csharp :: how to run an external program with c# 
Csharp :: save file with unique name c# 
Csharp :: hex string to int c# 
Csharp :: unity quit code 
Csharp :: camera follow player unity smooth 
Csharp :: how to flip character in unity 2d 
Csharp :: C# previous method 
Csharp :: setactive unity 
Csharp :: C# cycle through directory 
Csharp :: c# prime factorization 
Csharp :: c# get object property value by name 
ADD CONTENT
Topic
Content
Source link
Name
8+2 =