Date Formats

SAP ASE recognizes three basic date formats. Each format must be enclosed in quotes and can be preceded or followed by a time specification.

The set datefirst command specifies the day of the week (Sunday, Monday, and so on) when weekday or dw is used with datename, and a corresponding number when used with datepart. Changing the language with set language can also affect the format for dates, depending on the default first day of the week value for the language. For the default language of us_english, the default datefirst setting is Sunday=1, Monday=2, and so on; others produce Monday=1, Tuesday=2, and so on. Use set datefirst to change default behavior on a per-session basis. See the Reference Manual: Commands.

Related concepts
Enter Times