Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql datum formatieren

SELECT convert(varchar, getdate(), 100) -- mon dd yyyy hh:mmAM

SELECT convert(varchar, getdate(), 101) -- mm/dd/yyyy – 10/02/2008                  

SELECT convert(varchar, getdate(), 102) -- yyyy.mm.dd – 2008.10.02           

SELECT convert(varchar, getdate(), 103) -- dd/mm/yyyy

SELECT convert(varchar, getdate(), 104) -- dd.mm.yyyy

SELECT convert(varchar, getdate(), 105) -- dd-mm-yyyy

SELECT convert(varchar, getdate(), 106) -- dd mon yyyy

SELECT convert(varchar, getdate(), 107) -- mon dd, yyyy

SELECT convert(varchar, getdate(), 108) -- hh:mm:ss

SELECT convert(varchar, getdate(), 109) -- mon dd yyyy hh:mm:ss:mmmAM (or PM)

SELECT convert(varchar, getdate(), 110) -- mm-dd-yyyy

SELECT convert(varchar, getdate(), 111) -- yyyy/mm/dd

SELECT convert(varchar, getdate(), 112) -- yyyymmdd

SELECT convert(varchar, getdate(), 113) -- dd mon yyyy hh:mm:ss:mmm

SELECT convert(varchar, getdate(), 114) -- hh:mm:ss:mmm(24h)

SELECT convert(varchar, getdate(), 120) -- yyyy-mm-dd hh:mm:ss(24h)

SELECT convert(varchar, getdate(), 121) -- yyyy-mm-dd hh:mm:ss.mmm

SELECT convert(varchar, getdate(), 126) -- yyyy-mm-ddThh:mm:ss.mmm
Comment

PREVIOUS NEXT
Code Example
Sql :: postgresql create table as select 
Sql :: influxdb delete measurement based on date 
Sql :: delete table row in postgresql 
Sql :: sql unique select 
Sql :: sql insert into select 
Sql :: how to delete database in mysql 
Sql :: sum sqlserver 
Sql :: mysql show slave status 
Sql :: count in sql 
Sql :: postgresql create table many-to-many 
Sql :: top 3 salary in sql 
Sql :: relation does not exist postgresql 
Sql :: grant create db postgres 
Sql :: how to convert external table to managed table in hive 
Sql :: power query datetime to date 
Sql :: mysqli auto increment id 
Sql :: export mysql database command line 
Sql :: mysql nested query 
Sql :: how to move a column to different spot mysql 
Sql :: how to get table id sequence postgres 
Sql :: get month sql 
Sql :: sql create cluster index 
Sql :: SQL/update 
Sql :: mysqkldump devilbox 
Sql :: md5 encode oracle 
Sql :: stored procedure data to table 
Sql :: order by with where clause in mysql 
Sql :: mysql update multiple columns 
Sql :: Write the order of execution of all the SQL clauses and statements 
Sql :: .env pgsql 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =