D
D
Drovosek012018-04-19 14:07:16
SQL
Drovosek01, 2018-04-19 14:07:16

How to find out "standard"/datetime format in MSSQL DB?

By the method of scientific poke, I found out that mssql correctly accepts the datetime type when you write it like this. At first I tried to add a date in this format, but it gave an error. So, as I understand it, the date type is in the YYYY-DD-MM format. Then I ran a query to see if there was any information about how to insert the date. Got this response
insert into testtable values ('1990-26-07')
insert into testtable values ('1990-07-26')
sp_helplanguage @@language

21	dmy	1	0	русский	Russian	Январь,Февраль,Март,Апрель,Май,Июнь,Июль,Август,Сентябрь,Октябрь,Ноябрь,Декабрь	янв,фев,мар,апр,май,июн,июл,авг,сен,окт,ноя,дек	понедельник,вторник,среда,четверг,пятница,суббота,воскресенье	1049	1049

in which dateformat = dmy, which does not match the format that worked for me O_0

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Skorzhinsky, 2018-04-19
@Drovosek01

Date-time string constant in MS SQL

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question