Performing a query in Sql Server 2005 and receive some nonsensical values for the date field
For example, I receive dates formatted as
"2020-09-04 00:00:00.000"
Using "DATETIME" in my CREATE TABLE section (per the example below) does not appear to work properly.
EXAMPLE------------------------------------------
CREATE TABLE ##tmpTest
DATE_PERIOD DATETIME
.
.
.
-------------------------------------------------
Upon opening the table in sql server, the "DATE_PERIOD" field is formatted like "201001'
What is the correct field type for a date column that has the format YYYYMM?
For example, I receive dates formatted as
"2020-09-04 00:00:00.000"
Using "DATETIME" in my CREATE TABLE section (per the example below) does not appear to work properly.
EXAMPLE------------------------------------------
CREATE TABLE ##tmpTest
DATE_PERIOD DATETIME
.
.
.
-------------------------------------------------
Upon opening the table in sql server, the "DATE_PERIOD" field is formatted like "201001'
What is the correct field type for a date column that has the format YYYYMM?