Answer the question
In order to leave comments, you need to log in
MSSQL data selection in date range?
Hello everyone, please help with the request, honestly not special in the database
exec sp_columns SysUserSession, shows the data type of CreatedOn ---> datetime2
visually the data is displayed in the column like this: 06/20/2017 8:05:32 AM
I make a request:
SELECT * FROM SysUserSession WHERE CreatedOn BETWEEN '20.06.2017 8:05:32' AND '21.06.2017 00:00:00'
I get: "Conversion failed when converting date and/or time from character string."
As far as I understand, the request cannot translate the string into the correct date format
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question