Search
 
SCRIPT & CODE EXAMPLE
 

SQL

SQL query to convert DD/MM/YYYY to YYYY-MM-DD

SELECT CONVERT(varchar(10), CONVERT(date, '13/12/2016', 103), 120)
Comment

convert date to dd/mm/yyyy sql

select CONVERT(char(10), GetDate(),103)
/* 30/06/2021 */
Comment

SQL MM/dd/yyyy format

SELECT CONVERT(VARCHAR(11), GETDATE(), 101) AS [MM/DD/YYYY]
Comment

sql convert date to string yyyy-mm-dd

select CONVERT(char(10), GetDate(),126)
/* 2020-12-23 */
Comment

sql date format dd-mm-yyyy

SELECT FORMAT (getdate(), 'dd-MM-yy') as date
GO
Comment

convert dd/mm/yyyy to yyyy-mm-dd in sql server

set dateformat dmy;
select PersonalDetails_DOB
    ,convert(nvarchar(10), cast(PersonalDetails_DOB as datetime), 102) as ANSI_DOB
    ,convert(nvarchar(10), cast(PersonalDetails_DOB as datetime), 120) as ODBC_DOB
from Users;
Comment

sql convert format for MM/YYYY

DECLARE @myDate DATETIME = '2012-04-20 05:54:59'
SELECT FORMAT(@myDate, 'MM-yyyy')
Comment

PREVIOUS NEXT
Code Example
Sql :: get name of day in sql 
Sql :: oracle drop index if exists 
Sql :: float precision in psql 
Sql :: allow external access to mysql 
Sql :: install mysql in ubuntu 
Sql :: update value postgresql 
Sql :: mysql set id auto increment 
Sql :: spring datasource properties mysql 
Sql :: calculate distance between two latitude longitude points sql 
Sql :: show all database inside postgresql 
Sql :: SQL Server - Count number of times a specific character appears in a string 
Sql :: postgres statistics 
Sql :: mysql grant access to one database 
Sql :: dateadd in sql 
Sql :: generate sequence number in sql server 
Sql :: update from table tsql 
Sql :: drop row pgadmin 
Sql :: SQL Modify Column in a Table -MySQL 
Sql :: create table in sql 
Sql :: mysql check datetime equals date 
Sql :: Mysql Create table with foreign keys. 
Sql :: mysqldump ignore table 
Sql :: how to test for sql injection 
Sql :: mysql terminal run sql file 
Sql :: mysql select into new table 
Sql :: phone no data type in sql server 
Sql :: oracle list grants on procedure 
Sql :: sql remove decimal places 
Sql :: psql create user 
Sql :: change filed order in mysql 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =