Search
 
SCRIPT & CODE EXAMPLE
 

SQL

SQL date part only of datetime

select convert(date, getdate())
Comment

sql server - Time part of a DateTime Field in SQL

DECLARE @datetime datetime

SELECT @datetime = GETDATE()

SELECT RIGHT('0'+CAST(DATEPART(hour, @datetime) as varchar(2)),2) + ':' +
       RIGHT('0'+CAST(DATEPART(minute, @datetime)as varchar(2)),2)
Comment

PREVIOUS NEXT
Code Example
Sql :: SET NOCOUNT ON; 
Sql :: how to delete a record from sqlite in android 
Sql :: mysqldump: Got error: 1045: Access denied for user 
Sql :: concate update mysq 
Sql :: sqlite show table definition 
Sql :: alter table add column forigen key mysql 
Sql :: phone number sql 
Sql :: mysql show attributes of a table 
Sql :: find duplicates mysql 
Sql :: sql update table remove spaces 
Sql :: how to see the query of a view in mysql 
Sql :: sql unique rows 
Sql :: mysql show table structure 
Sql :: how to check if a row is null in sql 
Sql :: postgres foreign key multiple columns 
Sql :: Alter table add column in SQL Server- NAYCode.com 
Sql :: SQL Count UNIQUE Rows 
Sql :: sql select second max 
Sql :: cheatsheet for sql 
Sql :: drop df constraint sql server 
Sql :: sql server locks 
Sql :: how to extract year from date in sql 
Sql :: how to change a collumn name in sql 
Sql :: mysql command not working in linux 
Sql :: how to show index type in postgresql 
Sql :: mysql search table in all databases 
Sql :: sql date format 
Sql :: mysql change timestamp on update 
Sql :: how to drop function in sql 
Sql :: how to combine diff colmun value using group by postgres 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =