Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

Set time format DD/MM/YYYY in MSSQL

$
0
0

Hello.
I have problem with settings my format time to column "start_date" and "end_date" when i created table i my MSSQL database. Default format set date in format YYYY/MM/DD. I want set format DD/MM/YYYY. How i should write this in code?

This is how i tried make this.

CREATE TABLE IF NOT EXISTS job_history (
EMPLOYEE_ID decimal(6,0) NOT NULL,
START_DATE date NOT NULL,
END_DATE date NOT NULL
CHECK (END_DATE LIKE '--/--/----'),
JOB_ID varchar(10) NOT NULL,
DEPARTMENT_ID decimal(4,0) NOT NULL
);





Viewing all articles
Browse latest Browse all 4729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>