SysTutorials Forums QA How to compare date in SQL?


How to compare date in SQL? For example, the 'users' table has a column 'loggin' which is the date and time. How to find out the 'users' whose 'loggin' date is later than Jan 10, 2017?

In SQL, dates can be compared using ‘< ‘, ‘>’, ‘< =‘ and ‘>=‘.

For the example described, the SQL statement could be:

FROM users
WHERE login > ‘2017-01-10’

Related references as follows.

For the date string

Reply To: How to compare date in SQL?
Your information:

<a href="" title="" rel="" target=""> <blockquote cite=""> <code> <pre> <em> <strong> <del datetime=""> <ul> <ol start=""> <li> <img src="" border="" alt="" height="" width="">

Please share if you like this post: