CEILINGDATE

Syntax

CEILINGDATE(<Date>;<String>)

Description

Rounds a date argument up to the beginning of the next 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

DateStringCEILINGDATE Returns

Jun 14, 2018 12:23:05

YEAR

Jan 1, 2019 12:00:00 AM

Jun 14, 2018 12:23:05

QUARTER

Jul 1, 2018 12:00:00 AM

Jun 14, 2018 12:23:05

MONTH

Jul 1, 2018 12:00:00 AM

Jun 14, 2018 12:23:05

WEEK

Jun 17, 2018 12:00:00 AM

Jun 14, 2018 12:23:05

DAY

Jun 15, 2018 12:00:00 AM

Jun 14, 2018 12:23:05

HOUR

Jun 14, 2018 01:00:00 PM

Jun 14, 2018 12:23:05

MINUTE

Jun 14, 2018 12:24:00 PM

Jun 14, 2018 12:23:05.001

SECOND

Jun 14, 2018 12:23:06 PM

Jun 14, 2018 12:23:05.001

MILLISECOND

Jun 14, 2018 12:23:05.001 PM