STARTOFWEEK

Syntax

STARTOFWEEK(<date>)

Description

Returns the date of the first day of week (Sunday night/Monday morning 00:00:00) for the given date.

Examples

DateSTARTOFWEEK returns
Jan 1, 2012Dec 26, 2011 12:00:00 AM
Jan 2, 2012Jan 2, 2012 12:00:00 AM
Jan 3, 2012Jan 2, 2012 12:00:00 AM
Jan 4, 2012Jan 2, 2012 12:00:00 AM
Jan 5, 2012Jan 2, 2012 12:00:00 AM
Jan 6, 2012Jan 2, 2012 12:00:00 AM
Jan 7, 2012Jan 2, 2012 12:00:00 AM
Jan 8, 2012Jan 2, 2012 12:00:00 AM
Jan 9, 2012Jan 9, 2012 12:00:00 AM
Jan 10, 2012Jan 9, 2012 12:00:00 AM
Jan 11, 2012Jan 9, 2012 12:00:00 AM
Jan 12, 2012Jan 9, 2012 12:00:00 AM
Jan 13, 2012Jan 9, 2012 12:00:00 AM
Jan 14, 2012Jan 9, 2012 12:00:00 AM
Jan 15, 2012Jan 9, 2012 12:00:00 AM

Datameer always uses the following format:

Three character month abbreviation (space) two digit day (comma)(space) four digit year (space) two digit hour (colon) two digit minute (colon) two digit second (space) two character meridiem notation.

(e.g., 12.01.2012 gets transferred to Jan 12, 2012 12:00:00 AM)

When selecting a pattern, you select the way the data gets parsed (your input format, this can be connected to your systems representation of dates and times).