Search
 
SCRIPT & CODE EXAMPLE
 

SQL

date to string sql

SELECT 
    TO_CHAR(SYSDATE, 'YYYY-MM-DD') 
FROM 
    dual;
Code language: SQL (Structured Query Language) (sql)
Comment

sql server datetime to string

DECLARE @dt DATETIME = '2019-12-31 14:43:35.863';

SELECT 
    CONVERT(VARCHAR(20),@dt,0) s1,
    CONVERT(VARCHAR(20),@dt,100) s2;

=========================================
                 OUTPUT
=========================================
s1                   s2
-------------------- --------------------
Dec 31 2019  2:43PM  Dec 31 2019  2:43PM

(1 row affected)
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql shell clear screen 
Sql :: How can I tell how many Cores SQL Server is actually using? 
Sql :: sp in sql server 
Sql :: check index sql server 
Sql :: psql select database 
Sql :: sql groub by count 
Sql :: The local psql command could not be located 
Sql :: restore backup to new database sql server 
Sql :: how to find third highest salary in sql 
Sql :: mysql update column to be nullable 
Sql :: sql change date format 
Sql :: sql server insert into table 
Sql :: sql row number in result set 
Sql :: difference between join vs union 
Sql :: xampp mysql version 
Sql :: sql between 
Sql :: query to count the number of rows in a table in sqlalchemy 
Sql :: how to create external table in hive 
Sql :: como consultar registros duplicados en mysql 
Sql :: SQL Less Than or Equal to Operator 
Sql :: increment integer in table sql 
Sql :: sql insert column 
Sql :: sql database connectivity 
Sql :: counting in sql 
Sql :: Add image in MySQL database 
Sql :: get sum sqlite android 
Sql :: alter table add foreign key mariadb example 
Sql :: sql update multiple columns 
Sql :: Get all index postgres 
Sql :: create function in sql 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =