Get Date Entity

I’ve created an scalar function who returns the following date parts: year, month, day, quarter, week, hour, minute, second, day of year, day of week, date format (yyymmdd, yymmdd, ddmmyyyy, ddmmyy, ddmm, mmdd).

The example of usage is:

The result for this is something like this.


Don’t forget to create also the function “FormatDate”  from the previous post.

Enjoy and feel free to modify it as you need. 🙂

Posted in MSSQL.