SQL Server supports the date format in Arabic style by using the Kuwaiti algorithm.
In the following table, the two columns on the left represent the style values for converting datetime or smalldatetime data to character data. Add 100 to a style value to obtain a four-place year that includes the century (yyyy).
Without century (yy) (1) With century (yyyy) Standard Input/Output (3) - 0 or 100 (1, 2) Default mon dd yyyy hh:miAM (or PM)
- 126 (4) ISO8601 yyyy-mm-ddThh:mm:ss.mmm (no spaces)
127(6) ISO8601 with time zone Z. yyyy-mm-ddThh:mm:ss.mmmZ
(no spaces)
- 130 (1, 2) Hijri (5) dd mon yyyy hh:mi:ss:mmmAM
- 131 (2) Hijri (5) dd/mm/yy hh:mi:ss:mmmAM
1 These style values return nondeterministic results. Includes all (yy) (without century) styles and a subset of (yyyy) (with century) styles.
2. The default values (style 0 or 100, 9 or 109, 13 or 113, 20 or 120, and 21 or 121) always return the century (yyyy).
3 Input when you convert to datetime; output when you convert to character data.
4 Designed for XML use. For conversion from datetime or smalldatetime to character data, the output format is as described in the previous table. For conversion from float, money, or smallmoney to character data, the output is equivalent to the style value of 2. For conversion from real to character data, the output is equivalent to the style value of 1.
5. Hijri is a calendar system with several variations. SQL Server 2005 uses the Kuwaiti algorithm.
Important: By default, SQL Server interprets two-digit years based on a cutoff year of 2049. That is, the two-digit year 49 is interpreted as 2049 and the two-digit year 50 is interpreted as 1950. Many client applications, such as those based on Automation objects, use a cutoff year of 2030. SQL Server provides the two digit year cutoff configuration option that changes the cutoff year used by SQL Server and allows for the consistent treatment of dates. We recommend specifying four-digit years.
6. Only supported when casting from character data to datetime or smalldatetime. The time zone indicator, Z, is optional. Character data representing only date or only time components will be cast to the datetime data type. The unspecified time component is set to 00:00:00.000, and the unspecified date component is set to 1900-01-01.
When you convert to character data from smalldatetime, the styles that include seconds or milliseconds show zeros in these positions. You can truncate unwanted date parts when you convert from datetime or smalldatetime values by using an appropriate char or varchar data type length.
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.