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

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 :: import .sql into postgres db command 
Sql :: adding a check statement in sql 
Sql :: get first n letter of department name in sql 
Sql :: Configure MYSQL to run on another port number, other than the default port 3306 ubuntu linux 
Sql :: varchar plsql 
Sql :: group_concat order by 
Sql :: script to add new column in table sql 
Sql :: sql drop database statement 
Sql :: mysql root localhost run 
Sql :: MSSQL SYNTAX PROCEDURE FUNCTION TRIGGER 
Sql :: ora-00054 resource busy and acquire with nowait 
Sql :: how to check schema privileges in oracle 
Sql :: oracle asynchronous query 
Sql :: is there any command to change postgres password 
Sql :: python escape string for sql 
Sql :: oracle current date minus 1 day 
Sql :: sql show tables 
Sql :: How to Add a Default Value to a Column in MS SQL Server 
Sql :: how to alter length character varying postgres 
Sql :: how to pass password mysql command line 
Sql :: change old domain to new domain name wordpress 
Sql :: mysql limit offset 
Sql :: sql query to search for a string in all columns 
Sql :: create table sqlite 
Sql :: can you update NULL in sql 
Sql :: mysql columns values as comma separated string 
Sql :: sql offset 
Sql :: oracle difference between two dates in seconds 
Sql :: how to get duplicate records with multiple field in sql 
Sql :: mysql else if 
ADD CONTENT
Topic
Content
Source link
Name
2+8 =