FLOORDATE

Syntax

FLOORDATE(<Date>;<String>)

Description

Rounds a date argument down to the beginning of the current date interval. The size of the date interval is indicated by a string argument (supported interval arguments are 'YEAR', 'QUARTER', 'MONTH', 'WEEK', 'DAY', 'HOUR', 'MINUTE', 'SECOND', or 'MILLISECOND').

Examples

DateStringFLOORDATE Returns

Jun 14, 2018 12:23:05

YEARJan 1, 2018 12:00:00 AM

Jun 14, 2018 12:23:05

QUARTER

Apr 1, 2018 12:00:00 AM

Jun 14, 2018 12:23:05

MONTH

Jun 1, 2018 12:00:00 AM

Jun 14, 2018 12:23:05

WEEK

Jun 10, 2018 12:00:00 AM

Jun 14, 2018 12:23:05

DAY

Jun 14, 2018 12:00:00 AM

Jun 14, 2018 12:23:05

HOUR

Jun 14, 2018 12:00:00 PM

Jun 14, 2018 12:23:05

MINUTE

Jun 14, 2018 12:23:00 PM

Jun 14, 2018 12:23:05.001

SECOND

Jun 14, 2018 12:23:05 PM

Jun 14, 2018 12:23:05.001MILLISECOND

Jun 14, 2018 12:23:05.001 PM