How do I extract part of a date with SQL?

You might often need to do this if you're to aggregate daily data stretching over a longer time period and yet retain the timing The standard way forward is to use theĀ  date_part() function Below you can find its syntax within some of the most widely used database environments   Curious for alternative approaches?