The DatePart() function retreives a part from a date. e.g. the year, the month or the minutes.

Syntax

DatePart(date, unit)

Returns

A number that is a part of a date. If the date is unknown then this function returns unknown.

Parameters

  • date a date.
  • unit the [date unit][1] that is retreived from date.

Examples

DatePart('2014-08-21T12:00:30', Year)
/* Returns 2014 */

DatePart('2014-08-21T12:00:30', Month)
/* Returns 8 */

DatePart('2014-08-21T12:00:30', Hour)
/* Returns 12 */

DatePart('2014-08-21T12:00:30', Minute)
/* Returns 0 */

DatePart(UnknownDateTime, Year)
/* unknown */

 +31 (0)20 240 21 20       

Videos and images courtesy of WEM Modeler. © 2019. WEM Modeler.
SitemapPrivacy - Terms - Company

 +31 (0)20 240 21 20       


Videos and images courtesy of WEM Modeler.
© 2019 WEM Modeler.
SitemapPrivacy - Terms - Company