Is your SSMS set up in English? If so, please go to the next video.

If not, then...

As you have seen in the previous video, Microsoft has recommended that you create dates in this format:

'2025-01-01'

However, this doesn't necessarily work if you are using an interface language other than English. In the next video, I'll use the statement:

declare @mydate as datetime = '2015-06-24 12:34:56.124'

If this doesn't work on your version of SQL Server, then please use one of the following 2 formats instead:

declare @mydate as datetime = '20150624 12:34:56.124'

declare @mydate as datetime = '2015-06-24T12:34:56.124'

In the first statement, you remove the hyphens. In the second statement, use a letter T instead of a space between the date and time. However, this only works if you have a time part.

If you have any questions, please let me know in the Q&A.

Keep learning!

Phillip