If you want to follow along and run some SQL code with the same data that I'm using, I'd recommend using db<>fiddle:
- https://dbfiddle.uk/rKIFRoNm
The written version of this content is also available at:
- https://bilbottom.github.io/sql-learning-materials/from-excel-to-sql/main-concepts/date-formatting/
---------------------------------------------------
The formats that I recommend you get familiar with are:
- dd/MM/yyyy (01/12/2024)
- dd MMM yyyy (01 Dec 2024)
- MM/dd/yyyy (12/01/2024)
- MMM dd yyyy (Dec 01 2024)
- HH:mm:ss (11:30:45)
- yyyy-MM-dd HH:mm:ss (2024-12-01 11:30:45)
- MMM d yyyy HH:mm:ss tt (Dec 1 2024 11:30:45 AM)
- yyyy-MM (2024-12)
- MMM-yy (Dec-24)
- MMMM yyyy (December 2024)
- dddd, dd MMMM yyyy (Sunday, 01 December 2024)
@SQLwithBill