Format Specifier Description
d Represents the day of the month as a number from 1 through 31. A single-digit day is formatted without a leading zero. For more information about using a single custom format specifier.
dd Represents the day of the month as a number from 01 through 31. A single-digit day is formatted with a leading zero.
ddd Represents the abbreviated name of the day of the week as defined in the current DateTimeFormatInfo.AbbreviatedDayNames property.
dddd (plus any number of additional d specifiers) Represents the full name of the day of the week as defined in the current DateTimeFormatInfo.DayNames property.
f Represents the most significant digit of the seconds fraction; that is, it represents the tenths of a second in a date and time value.

If the f format specifier is used without other format specifiers, it is interpreted as the f standard date and time format specifier. For more information about using a single format specifier, see Using Single Custom Format Specifiers.

When used as part of a format string supplied to the ParseExact, TryParseExact, ParseExact, or TryParseExact methods, the number of f format specifiers used indicates the number of most significant digits of the seconds fraction that must be present to successfully parse the string.
ff Represents the two most significant digits of the seconds fraction; that is, it represents the hundredths of a second in a date and time value.
fff Represents the three most significant digits of the seconds fraction; that is, it represents the milliseconds in a date and time value.
ffff Represents the four most significant digits of the seconds fraction; that is, it represents the ten thousandths of a second in a date and time value.

While it is possible to display the ten thousandths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
fffff Represents the five most significant digits of the seconds fraction; that is, it represents the hundred thousandths of a second in a date and time value.

While it is possible to display the hundred thousandths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
ffffff Represents the six most significant digits of the seconds fraction; that is, it represents the millionths of a second in a date and time value.

While it is possible to display the millionths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
fffffff Represents the seven most significant digits of the seconds fraction; that is, it represents the ten millionths of a second in a date and time value.

While it is possible to display the ten millionths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
F Represents the most significant digit of the seconds fraction; that is, it represents the tenths of a second in a date and time value. Nothing is displayed if the digit is zero.

If the F format specifier is used without other format specifiers, it is interpreted as the F standard date and time format specifier. For more information about using a single format specifier, see Using Single Custom Format Specifiers.

The number of F format specifiers used with the ParseExact, TryParseExact, ParseExact, or TryParseExact methods indicates the maximum number of most significant digits of the seconds fraction that can be present to successfully parse the string.
FF Represents the two most significant digits of the seconds fraction; that is, it represents the hundredths of a second in a date and time value. However, trailing zeros or two zero digits are not displayed.
FFF Represents the three most significant digits of the seconds fraction; that is, it represents the milliseconds in a date and time value. However, trailing zeros or three zero digits are not displayed.
FFFF Represents the four most significant digits of the seconds fraction; that is, it represents the ten thousandths of a second in a date and time value. However, trailing zeros or four zero digits are not displayed.

While it is possible to display the ten thousandths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
FFFFF Represents the five most significant digits of the seconds fraction; that is, it represents the hundred thousandths of a second in a date and time value. However, trailing zeros or five zero digits are not displayed.

While it is possible to display the hundred thousandths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
FFFFFF Represents the six most significant digits of the seconds fraction; that is, it represents the millionths of a second in a date and time value. However, trailing zeros or six zero digits are not displayed.

While it is possible to display the millionths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
FFFFFFF Represents the seven most significant digits of the seconds fraction; that is, it represents the ten millionths of a second in a date and time value. However, trailing zeros or seven zero digits are not displayed.

While it is possible to display the ten millionths of a second component of a time value, that value may not be meaningful. The precision of date and time values depends on the resolution of the system clock. On Windows NT 3.5 and later, and Windows Vista operating systems, the clock's resolution is approximately 10-15 milliseconds.
g, gg (plus any number of additional g specifiers) Represents the period or era, for example, A.D. Formatting ignores this specifier if the date to be formatted does not have an associated period or era string. For more information about using a single format specifier, see Using Single Custom Format Specifiers.
h Represents the hour as a number from 1 through 12, that is, the hour as represented by a 12-hour clock that counts the whole hours since midnight or noon. A particular hour after midnight is indistinguishable from the same hour after noon. The hour is not rounded, and a single-digit hour is formatted without a leading zero. For example, given a time of 5:43, this custom format specifier displays "5". For more information about using a single format specifier, see Using Single Custom Format Specifiers.
hh, hh (plus any number of additional h specifiers) Represents the hour as a number from 01 through 12, that is, the hour as represented by a 12-hour clock that counts the whole hours since midnight or noon. A particular hour after midnight is indistinguishable from the same hour after noon. The hour is not rounded, and a single-digit hour is formatted with a leading zero. For example, given a time of 5:43, this format specifier displays "05".
H Represents the hour as a number from 0 through 23, that is, the hour as represented by a zero-based 24-hour clock that counts the hours since midnight. A single-digit hour is formatted without a leading zero.

For more information about using a single format specifier, see Using Single Custom Format Specifiers.
HH, HH (plus any number of additional H specifiers) Represents the hour as a number from 00 through 23, that is, the hour as represented by a zero-based 24-hour clock that counts the hours since midnight. A single-digit hour is formatted with a leading zero.
K Represents the time zone information of a date and time value. When used with DateTime values, the result string is defined by the value of the DateTime.Kind property. For the local time zone (a DateTime.Kind property value of DateTimeKind.Local), this specifier is equivalent to the zzz specifier and produces a result string containing the local offset from Coordinated Universal Time (UTC); for example, "-07:00". For a Utc time (a DateTime.Kind property value of DateTimeKind.Utc), the result string includes a "Z" character to represent a UTC date. For a time from an unspecified time zone (a time whose DateTime.Kind property equals DateTimeKind.Unspecified, the result is equivalent to String.Empty. For DateTimeOffset values, the K format specifier is equivalent to the zz format specifier, and produces a result string containing the DateTimeOffset value's offset from UTC.

For more information about using a single format specifier, see Using Single Custom Format Specifiers.
m Represents the minute as a number from 0 through 59. The minute represents whole minutes that have passed since the last hour. A single-digit minute is formatted without a leading zero. For more information about using a single format specifier, see Using Single Custom Format Specifiers.
mm, mm (plus any number of additional m specifiers) Represents the minute as a number from 00 through 59. The minute represents whole minutes that have passed since the last hour. A single-digit minute is formatted with a leading zero.
M Represents the month as a number from 1 through 12. A single-digit month is formatted without a leading zero. For more information about using a single format specifier, see Using Single Custom Format Specifiers.
MM Represents the month as a number from 01 through 12. A single-digit month is formatted with a leading zero.
MMM Represents the abbreviated name of the month as defined in the current DateTimeFormatInfo.AbbreviatedMonthNames property.
MMMM Represents the full name of the month as defined in the current DateTimeFormatInfo..::.MonthNames property.
s Represents the seconds as a number from 0 through 59. The result represents whole seconds that have passed since the last minute. A single-digit second is formatted without a leading zero. For more information about using a single format specifier, see Using Single Custom Format Specifiers.
ss, ss (plus any number of additional s specifiers) Represents the seconds as a number from 00 through 59. The result represents whole seconds that have passed since the last minute. A single-digit second is formatted with a leading zero.
t Represents the first character of the AM/PM designator defined in the current DateTimeFormatInfo..::.AMDesignator or DateTimeFormatInfo..::.PMDesignator property. The AM designator is used if the hour in the time being formatted is less than 12. Otherwise, the PM designator is used. For more information about using a single format specifier, see Using Single Custom Format Specifiers.
tt, tt (plus any number of additional t specifiers) Represents the AM/PM designator as defined in the current DateTimeFormatInfo..::.AMDesignator or DateTimeFormatInfo..::.PMDesignator property. The AM designator is used if the hour in the time being formatted is less than 12. Otherwise, the PM designator is used.

Your application should be sure to use the tt specifier for languages for which it is necessary to maintain the distinction between AM and PM. An example is Japanese, for which the AM and PM designators differ in the second character instead of the first character.
y Represents the year as a one or two-digit number. If the year has more than two digits, only the two low-order digits appear in the result. If the first digit of a two-digit year begins with a zero (for example, 2008), the number is formatted without a leading zero. For more information about using a single format specifier, see Using Single Custom Format Specifiers.
yy Represents the year as a two-digit number. If the year has more than two digits, only the two low-order digits appear in the result. If the two-digit year has fewer than two significant digits, the number is padded with leading zeros to achieve two digits.
yyy Represents the year with a minimum of three digits. If the year has more than three significant digits, they are included in the result string. If the year has fewer than three digits, the number is padded with leading zeros to achieve three digits.

Note that for the Thai Buddhist calendar, which can have five-digit years, this format specifier displays all five digits.
yyyy Represents the year as a four-digit number. If the year has more than four digits, only the four low-order digits appear in the result. If the year has fewer than four digits, the number is padded with leading zeros to achieve four digits.

Note that for the Thai Buddhist calendar, which can have five-digit years, this format specifier includes all five digits.
yyyyy (plus any number of additional y specifiers) Represents the year as a five-digit number. If the year has more than five digits, only the five low-order digits appear in the result. If the year has fewer than five digits, the number is padded with leading zeroes to achieve five digits.

If there are additional y specifiers, the number is padded with as many leading zeroes as necessary to achieve the number of y specifiers.
z With DateTime values, represents the signed offset of the local operating system's time zone from Coordinated Universal Time (UTC), measured in hours. It does not reflect the value of an instance's Kind property. For this reason, the z format specifier is not recommended for use with DateTime values.

With DateTimeOffset values, represents the DateTimeOffset value's offset from UTC in hours.

The offset is always displayed with a leading sign. A plus sign ( ) indicates hours ahead of and a minus sign (-) indicates hours behind UTC. The offset ranges from –12 through 13. A single-digit offset is formatted without a leading zero. For more information about using a single format specifier, see Using Single Custom Format Specifiers.
zz With DateTime values, represents the signed offset of the local operating system's time zone from UTC, measured in hours. It does not reflect the value of an instance's Kind property. For this reason, the zz format specifier is not recommended for use with DateTime values.

With DateTimeOffset values, represents the DateTimeOffset value's offset from UTC in hours.

The offset is always displayed with a leading sign. A plus sign ( ) indicates hours ahead of and a minus sign (-) indicates hours behind UTC. The offset ranges from –12 through 13. A single-digit offset is formatted with a leading zero.
zzz, zzz (plus any number of additional z specifiers) With DateTime values, represents the signed offset of the local operating system's time zone from UTC, measured in hours and minutes. It does not reflect the value of an instance's Kind property. For this reason, the zzz format specifier is not recommended for use with DateTime values.

With DateTimeOffset values, represents the DateTimeOffset value's offset from UTC in hours and minutes.

The offset is always displayed with a leading sign. A plus sign ( ) indicates hours ahead of and a minus sign (-) indicates hours behind UTC. The offset ranges from –12 through 13. A single-digit offset is formatted with a leading zero.
: Represents the time separator defined in the current DateTimeFormatInfo..::.TimeSeparator property. This separator is used to differentiate hours, minutes, and seconds.
/ Represents the date separator defined in the current DateTimeFormatInfo..::.DateSeparator property. This separator is used to differentiate years, months, and days.
" Represents a quoted string (quotation mark). Displays the literal value of any string between two quotation marks ("). Your application should precede each quotation mark with an escape character (\).
' Represents a quoted string (apostrophe). Displays the literal value of any string between two apostrophe (') characters.
%c Represents the result associated with a c custom format specifier, when the custom date and time format string consists solely of that custom format specifier. That is, to use the d, f, F, h, m, s, t, y, z, H, or M custom format specifier by itself, the application should specify %d, %f, %F, %h, %m, %s, %t, %y, %z, %H, or %M. For more information about using a single format specifier, see Using Single Custom Format Specifiers.
\c Represents the escape character, and displays the character "c" as a literal when that character is preceded by the escape character (\). To insert the backslash character itself in the result string, the application should use two escape characters ("\\").
Any other character Copies any other character to the result string, without affecting formatting.

Sourced from: http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx

Format specifier Name Description
0 Zero placeholder If the value being formatted has a digit in the position where the '0' appears in the format string, then that digit is copied to the result string; otherwise, a '0' appears in the result string. The position of the leftmost '0' before the decimal point and the align-rightmost '0' after the decimal point determines the range of digits that are always present in the result string.

The "00" specifier causes the value to be rounded to the nearest digit preceding the decimal, where rounding away from zero is always used. For example, formatting 34.5 with "00" would result in the value 35.
# Digit placeholder If the value being formatted has a digit in the position where the '#' appears in the format string, then that digit is copied to the result string. Otherwise, nothing is stored in that position in the result string.

Note that this specifier never displays the '0' character if it is not a significant digit, even if '0' is the only digit in the string. It will display the '0' character if it is a significant digit in the number being displayed.

The "##" format string causes the value to be rounded to the nearest digit preceding the decimal, where rounding away from zero is always used. For example, formatting 34.5 with "##" would result in the value 35.
. Decimal point The first '.' character in the format string determines the location of the decimal separator in the formatted value; any additional '.' characters are ignored.

The actual character used as the decimal separator in the result string is determined by the NumberDecimalSeparator property of the NumberFormatInfo object that controls formatting.
, Thousand separator and number scaling The ',' character serves as both a thousand separator specifier and a number scaling specifier.

Thousand separator specifier: If one or more ',' characters is specified between two digit placeholders (0 or #) that format the integral digits of a number, a group separator character is inserted between each number group in the integral part of the output.

The NumberGroupSeparator and NumberGroupSizes properties of the current NumberFormatInfo object determine the character used as the number group separator and the size of each number group. For example, if the string "#,#" and the invariant culture are used to format the number 1000, the output is "1,000".

Number scaling specifier: If one or more ',' characters is specified immediately to the left of the explicit or implicit decimal point, the number to be formatted is divided by 1000 each time a number scaling specifier occurs. For example, if the string "0,," is used to format the number 100 million, the output is "100".

You can use thousand separator and number scaling specifiers in the same format string. For example, if the string "#,0,," and the invariant culture are used to format the number one billion, the output is "1,000".
% Percentage placeholder The presence of a '%' character in a format string causes a number to be multiplied by 100 before it is formatted. The appropriate symbol is inserted in the number itself at the location where the '%' appears in the format string. The percent character used is dependent on the current NumberFormatInfo class.
E0 E 0 E-0 e0 e 0 e-0 Scientific notation If any of the strings "E", "E ", "E-", "e", "e ", or "e-" are present in the format string and are followed immediately by at least one '0' character, then the number is formatted using scientific notation with an 'E' or 'e' inserted between the number and the exponent. The number of '0' characters following the scientific notation indicator determines the minimum number of digits to output for the exponent. The "E " and "e " formats indicate that a sign character (plus or minus) should always precede the exponent. The "E", "E-", "e", or "e-" formats indicate that a sign character should only precede negative exponents.
\ Escape character In C# and C , the backslash character causes the next character in the format string to be interpreted as an escape sequence. It is used with traditional formatting sequences like '\n' (new line).

In some languages, the escape character itself must be preceded by an escape character when used as a literal. Otherwise, the compiler interprets the character as an escape sequence. Use the string "\\" to display '\'.

Note that this escape character is not supported in Visual Basic; however, ControlChars provides the same functionality.
'ABC' "ABC" Literal string Characters enclosed in single or double quotes are copied to the result string, and do not affect formatting.
; Section separator The ';' character is used to separate sections for positive, negative, and zero numbers in the format string. If there are two sections in the custom format string, the leftmost section defines the formatting of positive and zero numbers, while the align-rightmost section defines the formatting of negative numbers. If there are three sections, the leftmost section defines the formatting of positive numbers, the middle section defines the formatting of zero numbers, and the align-rightmost section defines the formatting of negative numbers.
Other All other characters Any other character is copied to the result string, and does not affect formatting.

Sourced from: http://msdn.microsoft.com/en-us/library/0c899ak8.aspx

Format specifier Name Description or custom format string
O or o none yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffzz
R or r RFC1123Pattern ddd, dd MMM yyyy HH':'mm':'ss 'GMT'
s SortableDateTimePattern yyyy'-'MM'-'dd'T'HH':'mm':'ss
u UniversalSortableDateTimePattern yyyy'-'MM'-'dd HH':'mm':'ss'Z'
d Short date pattern Represents a custom date and time format string defined by the current ShortDatePattern property. For example, the custom format string returned by the ShortDatePattern property of the invariant culture is "MM/dd/yyyy".
D Long date pattern Represents a custom date and time format string defined by the current LongDatePattern property. For example, the custom format string for the invariant culture is "dddd, dd MMMM yyyy".
f Full date/time pattern (short time) Represents a combination of the long date (D) and short time (t) patterns, separated by a space.
F Full date/time pattern (long time) Represents a custom date and time format string defined by the current FullDateTimePattern property. For example, the custom format string for the invariant culture is "dddd, dd MMMM yyyy HH:mm:ss".
g General date/time pattern (short time) Represents a combination of the short date (d) and short time (t) patterns, separated by a space.
G General date/time pattern (long time) Represents a combination of the short date (d) and long time (T) patterns, separated by a space.
M, m Month day pattern Represents a custom date and time format string defined by the current MonthDayPattern property. For example, the custom format string for the invariant culture is "MMMM dd".
O, o Round-trip date/time pattern Represents a custom date and time format string using a pattern that preserves time zone information. For DateTime values, this format specifier is designed to preserve date and time values along with the Kind property in text. Then the formatted string can be parsed back using Parse or ParseExact with the correct Kind property value.

The custom format string is "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK" for DateTime values and "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffzzz" for DateTimeOffset values. In this string, the pairs of apostrophes that delimit individual characters, such as the hyphens, the colons, and the letter "T", indicate that the individual character is a literal that cannot be changed. The apostrophes themselves do not appear in the output string.

The pattern for this specifier reflects a defined standard (ISO 8601). Therefore, it is always the same regardless of the culture used or the format provider supplied. Strings that are passed to the Parse or ParseExact method must conform exactly to this custom format pattern, or a FormatException is thrown.

When this standard format specifier is used, the formatting or parsing operation always uses the invariant culture.
R, r RFC1123 pattern Represents a custom date and time format string defined by the DateTimeFormatInfo.RFC1123Pattern property. The pattern reflects a defined standard and the property is read-only. Therefore, it is always the same, regardless of the culture used or the format provider supplied. The custom format string is "ddd, dd MMM yyyy HH':'mm':'ss 'GMT'".

When this standard format specifier is used, the formatting or parsing operation always uses the invariant culture.

Formatting does not modify the value of the DateTime or DateTimeOffset object that is being formatted. Therefore, the application must convert the value to Coordinated Universal Time (UTC) before using this format pattern.
s Sortable date/time pattern; conforms to ISO 8601 Represents a custom date and time format string defined by the DateTimeFormatInfo.SortableDateTimePattern property. The pattern reflects a defined standard and the property is read-only. Therefore, it is always the same, regardless of the culture used or the format provider supplied. The custom format string is "yyyy'-'MM'-'dd'T'HH':'mm':'ss".

When this standard format specifier is used, the formatting or parsing operation always uses the invariant culture.
t Short time pattern Represents a custom date and time format string defined by the current ShortTimePattern property. For example, the custom format string for the invariant culture is "HH:mm".
T Long time pattern Represents a custom date and time format string defined by the current LongTimePattern property. For example, the custom format string for the invariant culture is "HH:mm:ss".
u Universal sortable date/time pattern Represents a custom date and time format string defined by the DateTimeFormatInfo.UniversalSortableDateTimePattern property. The pattern reflects a defined standard and the property is read-only. Therefore, it is always the same, regardless of the culture used or the format provider supplied. The custom format string is "yyyy'-'MM'-'dd HH':'mm':'ss'Z'".

When this standard format specifier is used, the formatting or parsing operation always uses the invariant culture.

Formatting does not convert the time zone for the date and time object. Therefore, the application must convert a date and time to Coordinated Universal Time (UTC) before using this format specifier.
U Universal full date/time pattern Represents a custom date and time format string defined by the current FullDateTimePattern property.

The pattern is the same as the F pattern. However, formatting operates on the UTC that is equivalent to the DateTime value.

The U format specifier is not supported by the DateTimeOffset type and throws a FormatException if it is used to format a DateTimeOffset value.
Y, y Year month pattern Represents a custom date and time format string defined by the current YearMonthPattern property. For example, the custom format string for the invariant culture is "yyyy MMMM".
Any other single character (Unknown specifier) Throws a runtime FormatException.

Sourced from: http://msdn.microsoft.com/en-us/library/az4se3k1.aspx

Format specifier Name Description
C or c Currency The number is converted to a string that represents a currency amount. The conversion is controlled by the currency format information of the current NumberFormatInfo object.

The precision specifier indicates the desired number of decimal places. If the precision specifier is omitted, the default currency precision given by the current NumberFormatInfo object is used.
D or d Decimal This format is supported only for integral types. The number is converted to a string of decimal digits (0-9), prefixed by a minus sign if the number is negative.

The precision specifier indicates the minimum number of digits desired in the resulting string. If required, the number is padded with zeros to its left to produce the number of digits given by the precision specifier.
E or e Scientific (exponential) The number is converted to a string of the form "-d.ddd…E ddd" or "-d.ddd…e ddd", where each 'd' indicates a digit (0-9). The string starts with a minus sign if the number is negative. One digit always precedes the decimal point.

The precision specifier indicates the desired number of digits after the decimal point. If the precision specifier is omitted, a default of six digits after the decimal point is used.

The case of the format specifier indicates whether to prefix the exponent with an 'E' or an 'e'. The exponent always consists of a plus or minus sign and a minimum of three digits. The exponent is padded with zeros to meet this minimum, if required.
F or f Fixed-point The number is converted to a string of the form "-ddd.ddd…" where each 'd' indicates a digit (0-9). The string starts with a minus sign if the number is negative.

The precision specifier indicates the desired number of decimal places. If the precision specifier is omitted, the default numeric precision is given by the NumberDecimalDigits property of the current NumberFormatInfo object.
G or g General The number is converted to the most compact of either fixed-point or scientific notation, depending on the type of the number and whether a precision specifier is present. If the precision specifier is omitted or zero, the type of the number determines the default precision, as indicated by the following list.
  • Byte or SByte: 3
  • Int16 or UInt16: 5
  • Int32 or UInt32: 10
  • Int64 or UInt64: 19
  • Single: 7
  • Double: 15
  • Decimal: 29
Fixed-point notation is used if the exponent that would result from expressing the number in scientific notation is greater than -5 and less than the precision specifier; otherwise, scientific notation is used. The result contains a decimal point if required and trailing zeroes are omitted. If the precision specifier is present and the number of significant digits in the result exceeds the specified precision, then the excess trailing digits are removed by rounding.

The exception to the preceding rule is if the number is a Decimal and the precision specifier is omitted. In that case, fixed-point notation is always used and trailing zeroes are preserved.

If scientific notation is used, the exponent in the result is prefixed with 'E' if the format specifier is 'G', or 'e' if the format specifier is 'g'.
N or n Number The number is converted to a string of the form "-d,ddd,ddd.ddd…", where '-' indicates a negative number symbol if required, 'd' indicates a digit (0-9), ',' indicates a thousand separator between number groups, and '.' indicates a decimal point symbol. The actual negative number pattern, number group size, thousand separator, and decimal separator are specified by the NumberNegativePattern, NumberGroupSizes, NumberGroupSeparator, and NumberDecimalSeparator properties, respectively, of the current NumberFormatInfo object.

The precision specifier indicates the desired number of decimal places. If the precision specifier is omitted, the default numeric precision is given by the NumberDecimalDigits property of the current NumberFormatInfo object.
P or p Percent The number is converted to a string that represents a percent as defined by the NumberFormatInfo.PercentNegativePattern property if the number is negative, or the NumberFormatInfo.PercentPositivePattern property if the number is positive. The converted number is multiplied by 100 in order to be presented as a percentage.

The precision specifier indicates the desired number of decimal places. If the precision specifier is omitted, the default numeric precision given by the current NumberFormatInfo object is used.
R or r Round-trip This format is supported only for the Single and Double types. The round-trip specifier guarantees that a numeric value converted to a string will be parsed back into the same numeric value. When a numeric value is formatted using this specifier, it is first tested using the general format, with 15 spaces of precision for a Double and 7 spaces of precision for a Single. If the value is successfully parsed back to the same numeric value, it is formatted using the general format specifier. However, if the value is not successfully parsed back to the same numeric value, then the value is formatted using 17 digits of precision for a Double and 9 digits of precision for a Single.

Although a precision specifier can be present, it is ignored. Round trips are given precedence over precision when using this specifier.
X or x Hexadecimal This format is supported only for integral types. The number is converted to a string of hexadecimal digits. The case of the format specifier indicates whether to use uppercase or lowercase characters for the hexadecimal digits greater than 9. For example, use 'X' to produce "ABCDEF", and 'x' to produce "abcdef".

The precision specifier indicates the minimum number of digits desired in the resulting string. If required, the number is padded with zeros to its left to produce the number of digits given by the precision specifier.
Any other single character (Unknown specifier) (An unknown specifier throws a FormatException at runtime.)

Sourced from: http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx

Name Ctrl Dec Hex Char
null ctrl-@ 0 00 NUL
start of heading ctrl-A 1 01 SOH
start of text ctrl-B 2 02 STX
end of text ctrl-C 3 03 ETX
end of xmit ctrl-D 4 04 EOT
enquiry ctrl-E 5 05 ENQ
acknowledge ctrl-F 6 06 ACK
bell ctrl-G 7 07 BEL
backspace ctrl-H 8 08 BS
horizontal tab ctrl-I 9 09 HT
line feed ctrl-J 10 0A LF
vertical tab ctrl-K 11 0B VT
form feed ctrl-L 12 0C FF
carriage feed ctrl-M 13 0D CR
shift out ctrl-N 14 0E SO
shift in ctrl-O 15 0F SI
data line escape ctrl-P 16 10 DLE
device control 1 ctrl-Q 17 11 DC1
device control 2 ctrl-R 18 12 DC2
device control 3 ctrl-S 19 13 DC3
device control 4 ctrl-T 20 14 DC4
neg acknowledge ctrl-U 21 15 NAK
synchronous idel ctrl-V 22 16 SYN
end of xmit block ctrl-W 23 17 ETB
cancel ctrl-X 24 18 CAN
end of medium ctrl-Y 25 19 EM
substitute ctrl-Z 26 1A SUB
escape ctrl-[ 27 1B ESC
file separator ctrl-\ 28 1C FS
group separator ctrl-] 29 1D GS
record separator ctrl-^ 30 1E RS
unit separator ctrl-_ 31 1F US
Dec Hex Char   Dec Hex Char   Dec Hex Char
32 20 Space   64 40 @   96 60 `
33 21 !   65 41 A   97 61 a
34 22 "   66 42 B   98 62 b
35 23 #   67 43 C   99 63 c
36 24 $   68 44 D   100 64 d
37 25 %   69 45 E   101 65 e
38 26 &   70 46 F   102 66 f
39 27 ''   71 47 G   103 67 g
40 28 (   72 48 H   104 68 h
41 29 )   73 49 I   105 69 i
42 2A *   74 4A J   106 6A j
43 2B     75 4B K   107 6B k
44 2C ,   76 4C L   108 6C l
45 2D -   77 4D M   109 6D m
46 2E .   78 4E N   110 6E n
47 2F /   79 4F O   111 6F o
48 30 0   80 50 P   112 70 p
49 31 1   81 51 Q   113 71 q
50 32 2   82 52 R   114 72 r
51 33 3   83 53 S   115 73 s
52 34 4   84 54 T   116 74 t
53 35 5   85 55 U   117 75 u
54 36 6   86 56 V   118 76 v
55 37 7   87 57 W   119 77 w
56 38 8   88 58 X   120 78 x
57 39 9   89 59 Y   121 79 y
58 3A :   90 5A Z   122 7A z
59 3B ;   91 5B [   123 7B {
60 3C <   92 5C \   124 7C |
61 3D =   93 5D ]   125 7D }
62 3E >   94 5E ^   126 7E ~
63 3F ?   95 5F _   127 7F DEL

General Page Life-Cycle Stages

Stage Description
Page Request The page request occurs before the page life cycle begins. When the page is requested by a user, ASP.NET determines whether the page needs to be parsed and compiled (therefore beginning the life of a page), or whether a cached version of the page can be sent in response without running the page.
Start In the start step, page properties such as Request and Response are set. At this stage, the page also determines whether the request is a postback or a new request and sets the IsPostBack property. Additionally, during the start step, the page's UICulture property is set.
Page initialization During page initialization, controls on the page are available and each control's UniqueID property is set. Any themes are also applied to the page. If the current request is a postback, the postback data has not yet been loaded and control property values have not been restored to the values from view state.
Load During load, if the current request is a postback, control properties are loaded with information recovered from view state and control state.
Validation During validation, the Validate method of all validator controls is called, which sets the IsValid property of individual validator controls and of the page.
Postback event handling If the request is a postback, any event handlers are called.
Rendering Before rendering, view state is saved for the page and all controls. During the rendering phase, the page calls the Render method for each control, providing a text writer that writes its output to the OutputStream of the page's Response property.
Unload Unload is called after the page has been fully rendered, sent to the client, and is ready to be discarded. At this point, page properties such as Response and Request are unloaded and any cleanup is performed.

Life-cycle Events

Page Event Typical Use
PreInit Use this event for the following:
  • Check the IsPostBack property to determine whether this is the first time the page is being processed.
  • Create or re-create dynamic controls.
  • Set a master page dynamically.
  • Set the Theme property dynamically.
  • Read or set profile property values.
Note:
If the request is a postback, the values of the controls have not yet been restored from view state. If you set a control property at this stage, its value might be overwritten in the next event.
Init Raised after all controls have been initialized and any skin settings have been applied. Use this event to read or initialize control properties.
InitComplete Raised by the Page object. Use this event for processing tasks that require all initialization be complete.
PreLoad Use this event if you need to perform processing on your page or control before the Load event.

After the Page raises this event, it loads view state for itself and all controls, and then processes any postback data included with the Request instance.
Load The Page calls the OnLoad event method on the Page, then recursively does the same for each child control, which does the same for each of its child controls until the page and all controls are loaded.

Use the OnLoad event method to set properties in controls and establish database connections.
Control events Use these events to handle specific control events, such as a Button control's Click event or a TextBox control's TextChanged event.

Note:
In a postback request, if the page contains validator controls, check the IsValid property of the Page and of individual validation controls before performing any processing.
LoadComplete Use this event for tasks that require that all other controls on the page be loaded.
PreRender Before this event occurs:
  • The Page object calls EnsureChildControls for each control and for the page.
  • Each data bound control whose DataSourceID property is set calls its DataBind method. For more information, see Data Binding Events for Data-Bound Controls later in this topic.
The PreRender event occurs for each control on the page. Use the event to make final changes to the contents of the page or its controls.
SaveStateComplete Before this event occurs, ViewState has been saved for the page and for all controls. Any changes to the page or controls at this point will be ignored.

Use this event perform tasks that require view state to be saved, but that do not make any changes to controls.
Render This is not an event; instead, at this stage of processing, the Page object calls this method on each control. All ASP.NET Web server controls have a Render method that writes out the control's markup that is sent to the browser.

If you create a custom control, you typically override this method to output the control's markup. However, if your custom control incorporates only standard ASP.NET Web server controls and no custom markup, you do not need to override the Render method. For more information, see Developing Custom ASP.NET Server Controls.

A user control (an .ascx file) automatically incorporates rendering, so you do not need to explicitly render the control in code.
Unload This event occurs for each control and then for the page. In controls, use this event to do final cleanup for specific controls, such as closing control-specific database connections.

For the page itself, use this event to do final cleanup work, such as closing open files and database connections, or finishing up logging or other request-specific tasks.

Note:
During the unload stage, the page and its controls have been rendered, so you cannot make further changes to the response stream. If you attempt to call a method such as the Response.Write method, the page will throw an exception.

Data Binding Events for Data-Bound Controls

Control Event Typical Use
DataBinding This event is raised by data-bound controls before the PreRender event of the containing control (or of the Page object) and marks the beginning of binding the control to the data.

Use this event to manually open database connections, if required. (The data source controls often make this unnecessary.)
RowCreated (GridView only) or ItemCreated (DataList, DetailsView, SiteMapPath, DataGrid, FormView, Repeater, and ListView controls) Use this event to manipulate content that is not dependent on data binding. For example, at run time, you might programmatically add formatting to a header or footer row in a GridView control.
RowDataBound (GridView only) or ItemDataBound (DataList, SiteMapPath, DataGrid, Repeater, and ListView controls) When this event occurs, data is available in the row or item, so you can format data or set the FilterExpression property on child data source controls for displaying related data within the row or item.
DataBound This event marks the end of data-binding operations in a data-bound control. In a GridView control, data binding is complete for all rows and any child controls.

Use this event to format data bound content or to initiate data binding in other controls that depend on values from the current control's content. (For details, see "Catch-up Events for Added Controls" earlier in this topic.)

Sourced from: http://msdn.microsoft.com/en-us/library/ms178472.aspx

Normal Form Description
1st (1NF) A table (relation) is in 1NF if:
  • 1. There are no duplicated rows in the table.
  • 2. Each cell is single-valued (i.e., there are no repeating groups or arrays).
  • 3. Entries in a column (attribute, field) are of the same kind.
Note: The order of the rows is immaterial; the order of the columns is immaterial.
Note: The requirement that there be no duplicated rows in the table means that the table has a key (although the key might be made up of more than one column—even, possibly, of all the columns).
2nd (2NF) A table is in 2NF if it is in 1NF and if all non-key attributes are dependent on all of the key.
Note: Since a partial dependency occurs when a non-key attribute is dependent on only a part of the (composite) key, the definition of 2NF is sometimes phrased as, "A table is in 2NF if it is in 1NF and if it has no partial dependencies."
3rd (3NF) A table is in 3NF if it is in 2NF and if it has no transitive dependencies.
Boyce-Codd (BCNF) A table is in BCNF if it is in 3NF and if every determinant is a candidate key.
4th (4NF) A table is in 4NF if it is in BCNF and if it has no multi-valued dependencies.
5th (5NF) A table is in 5NF, also called "Projection-Join Normal Form" (PJNF), if it is in 4NF and if every join dependency in the table is a consequence of the candidate keys of the table.
Domain-Key (DKNF) A table is in DKNF if every constraint on the table is a logical consequence of the definition of keys and domains.

EXIF stands for "Exchangeable Image File Format". This type of information is formatted according to the TIFF specification, and may be found in JPG, TIFF, PNG, MIFF and HDP images, as well as many TIFF-based RAW images, and even some AVI and MOV videos.

The EXIF meta information is organized into different Image File Directories (IFD's) within an image. The names of these IFD's correspond to the ExifTool family 1 group names. When writing EXIF information, the default Group listed below is used unless another group is specified.

Also listed in the table below are TIFF, DNG, HDP and other tags which are not part of the EXIF specification, but may co-exist with EXIF tags in some images.

Original located here: http://owl.phy.queensu.ca/~phil/exiftool/TagNames/EXIF.html

TagID Tag Name Writable Group Values/Notes
0x0001 InteropIndex string InteropIFD 'R03' = R03 - DCF option file (Adobe RGB)
'R98' = R98 - DCF basic file (sRGB)
'THM' = THM - DCF thumbnail file
0x0002 InteropVersion undef InteropIFD  
0x000b ProcessingSoftware string IFD0 (used by ACD Systems Digital Imaging)
0x00fe SubfileType int32u IFD0 0 = Full-resolution Image
1 = Reduced-resolution image
2 = Single page of multi-page image
3 = Single page of multi-page reduced-resolution image
4 = Transparency mask
5 = Transparency mask of reduced-resolution image
6 = Transparency mask of multi-page image
7 = Transparency mask of reduced-resolution multi-page image
0x00ff OldSubfileType int16u IFD0 1 = Full-resolution image
2 = Reduced-resolution image
3 = Single page of multi-page image
0x0100 ImageWidth int32u IFD0  
0x0101 ImageHeight int32u IFD0 (called ImageLength in the EXIF specification)
0x0102 BitsPerSample int16u[n] IFD0  
0x0103 Compression int16u IFD0 1 = Uncompressed
2 = CCITT 1D
3 = T4/Group 3 Fax
4 = T6/Group 4 Fax
5 = LZW
6 = JPEG (old-style)
7 = JPEG
8 = Adobe Deflate
9 = JBIG B&W
10 = JBIG Color
99 = JPEG
262 = Kodak 262
32766 = Next
32767 = Sony ARW Compressed
32769 = Epson ERF Compressed
32771 = CCIRLEW
32773 = PackBits
32809 = Thunderscan
32867 = Kodak KDC Compressed
32895 = IT8CTPAD
32896 = IT8LW
32897 = IT8MP
32898 = IT8BL
32908 = PixarFilm
32909 = PixarLog
32946 = Deflate
32947 = DCS
34661 = JBIG
34676 = SGILog
34677 = SGILog24
34712 = JPEG 2000
34713 = Nikon NEF Compressed
65000 = Kodak DCR Compressed
65535 = Pentax PEF Compressed
0x0106 PhotometricInterpretation int16u IFD0 0 = WhiteIsZero
1 = BlackIsZero
2 = RGB
3 = RGB Palette
4 = Transparency Mask
5 = CMYK
6 = YCbCr
8 = CIELab
9 = ICCLab
10 = ITULab
32803 = Color Filter Array
32844 = Pixar LogL
32845 = Pixar LogLuv
34892 = Linear Raw
0x0107 Thresholding int16u IFD0 1 = No dithering or halftoning
2 = Ordered dither or halftone
3 = Randomized dither
0x0108 CellWidth int16u IFD0  
0x0109 CellLength int16u IFD0  
0x010a FillOrder int16u IFD0 1 = Normal
2 = Reversed
0x010d DocumentName string IFD0  
0x010e ImageDescription string IFD0  
0x010f Make string IFD0  
0x0110 Model string IFD0  
0x0111 StripOffsets
PreviewImageStart
PreviewImageStart
JpgFromRawStart
N
int32u*
int32u*
int32u*
-
IFD0
SubIFD1
SubIFD2
(PreviewImageStart in IFD0 of CR2 images and SubIFD1 of DNG images, and JpgFromRawStart in SubIFD2 of DNG images)
0x0112 Orientation int16u IFD0 1 = Horizontal (normal)
2 = Mirror horizontal
3 = Rotate 180
4 = Mirror vertical
5 = Mirror horizontal and rotate 270 CW
6 = Rotate 90 CW
7 = Mirror horizontal and rotate 90 CW
8 = Rotate 270 CW
0x0115 SamplesPerPixel int16u IFD0  
0x0116 RowsPerStrip int32u IFD0  
0x0117 StripByteCounts
PreviewImageLength
PreviewImageLength
JpgFromRawLength
N
int32u*
int32u*
int32u*
-
IFD0
SubIFD1
SubIFD2
(PreviewImageLength in IFD0 of CR2 images and SubIFD1 of DNG images, and JpgFromRawLength in SubIFD2 of DNG images)
0x0118 MinSampleValue int16u IFD0  
0x0119 MaxSampleValue int16u IFD0  
0x011a XResolution rational64u IFD0  
0x011b YResolution rational64u IFD0  
0x011c PlanarConfiguration int16u IFD0 1 = Chunky
2 = Planar
0x011d PageName string IFD0  
0x011e XPosition rational64u IFD0  
0x011f YPosition rational64u IFD0  
0x0120 FreeOffsets N -  
0x0121 FreeByteCounts N -  
0x0122 GrayResponseUnit int16u IFD0 1 = 0.1
2 = 0.001
3 = 0.0001
4 = 1e-05
5 = 1e-06
0x0123 GrayResponseCurve N -  
0x0124 T4Options N - Bit 0 = 2-Dimensional encoding
Bit 1 = Uncompressed
Bit 2 = Fill bits added
0x0125 T6Options N - Bit 1 = Uncompressed
0x0128 ResolutionUnit int16u IFD0 1 = None
2 = inches
3 = cm
0x0129 PageNumber int16u[2] IFD0  
0x012c ColorResponseUnit N -  
0x012d TransferFunction N -  
0x0131 Software string IFD0  
0x0132 ModifyDate string IFD0 (called DateTime by the EXIF spec)
0x013b Artist string IFD0  
0x013c HostComputer string IFD0  
0x013d Predictor int16u IFD0 1 = None
2 = Horizontal differencing
0x013e WhitePoint rational64u[2] IFD0  
0x013f PrimaryChromaticities rational64u[6] IFD0  
0x0140 ColorMap N -  
0x0141 HalftoneHints int16u[2] IFD0  
0x0142 TileWidth int32u IFD0  
0x0143 TileLength int32u IFD0  
0x0144 TileOffsets N -  
0x0145 TileByteCounts N -  
0x0146 BadFaxLines N -  
0x0147 CleanFaxData N - 0 = Clean
1 = Regenerated
2 = Unclean
0x0148 ConsecutiveBadFaxLines N -  
0x014a SubIFD
DataOffset
-
N
-
-
(the data offset in Sony DSLR-A100 ARW images)
0x014c InkSet int16u IFD0 1 = CMYK
2 = Not CMYK
0x014d InkNames N -  
0x014e NumberofInks N -  
0x0150 DotRange string IFD0  
0x0151 TargetPrinter N -  
0x0152 ExtraSamples N -  
0x0153 SampleFormat N - (SamplesPerPixel values)
[Value 0]
1 = Unsigned integer
2 = Two's complement signed integer
3 = IEEE floating point
4 = Undefined
5 = Complex integer
6 = IEEE floating point
[Value 1]
1 = Unsigned integer
2 = Two's complement signed integer
3 = IEEE floating point
4 = Undefined
5 = Complex integer
6 = IEEE floating point
[Value 2]
1 = Unsigned integer
2 = Two's complement signed integer
3 = IEEE floating point
4 = Undefined
5 = Complex integer
6 = IEEE floating point
0x0154 SMinSampleValue N -  
0x0155 SMaxSampleValue N -  
0x0156 TransferRange N -  
0x0157 ClipPath N -  
0x0158 XClipPathUnits N -  
0x0159 YClipPathUnits N -  
0x015a Indexed N - 0 = Not indexed
1 = Indexed
0x015b JPEGTables N -  
0x015f OPIProxy N - 0 = Higher resolution image does not exist
1 = Higher resolution image exists
0x0190 GlobalParametersIFD - -  
0x0191 ProfileType N - 0 = Unspecified
1 = Group 3 FAX
0x0192 FaxProfile N - 0 = Unknown
1 = Minimal B&W lossless, S
2 = Extended B&W lossless, F
3 = Lossless JBIG B&W, J
4 = Lossy color and grayscale, C
5 = Lossless color and grayscale, L
6 = Mixed raster content, M
0x0193 CodingMethods N - Bit 0 = Unspecified compression
Bit 1 = Modified Huffman
Bit 2 = Modified Read
Bit 3 = Modified MR
Bit 4 = JBIG
Bit 5 = Baseline JPEG
Bit 6 = JBIG color
0x0194 VersionYear N -  
0x0195 ModeNumber N -  
0x01b1 Decode N -  
0x01b2 DefaultImageColor N -  
0x0200 JPEGProc N - 1 = Baseline
14 = Lossless
0x0201 ThumbnailOffset
PreviewImageStart
JpgFromRawStart
JpgFromRawStart
OtherImageStart
int32u*
int32u*
int32u*
int32u*
N
IFD1
MakerNotes
SubIFD
IFD2
-
 
0x0202 ThumbnailLength
PreviewImageLength
JpgFromRawLength
JpgFromRawLength
OtherImageLength
int32u*
int32u*
int32u*
int32u*
N
IFD1
MakerNotes
SubIFD
IFD2
-
 
0x0203 JPEGRestartInterval N -  
0x0205 JPEGLosslessPredictors N -  
0x0206 JPEGPointTransforms N -  
0x0207 JPEGQTables N -  
0x0208 JPEGDCTables N -  
0x0209 JPEGACTables N -  
0x0211 YCbCrCoefficients rational64u[3] IFD0  
0x0212 YCbCrSubSampling int16u[2] IFD0 '1 1' = YCbCr4:4:4 (1 1)
'1 2' = YCbCr4:4:0 (1 2)
'2 1' = YCbCr4:2:2 (2 1)
'2 2' = YCbCr4:2:0 (2 2)
'4 1' = YCbCr4:1:1 (4 1)
'4 2' = YCbCr4:1:0 (4 2)
0x0213 YCbCrPositioning int16u IFD0 1 = Centered
2 = Co-sited
0x0214 ReferenceBlackWhite rational64u[6] IFD0  
0x022f StripRowCounts N -  
0x02bc ApplicationNotes int8u ExifIFD XMP Tags
0x1000 RelatedImageFileFormat string InteropIFD  
0x1001 RelatedImageWidth int16u InteropIFD  
0x1002 RelatedImageHeight int16u InteropIFD (called RelatedImageLength by the DCF specification)
0x4746 Rating int16u/ IFD0  
0x4749 RatingPercent int16u/ IFD0  
0x800d ImageID N -  
0x80a4 WangAnnotation N -  
0x80e3 Matteing N -  
0x80e4 DataType N -  
0x80e5 ImageDepth N -  
0x80e6 TileDepth N -  
0x827d Model2 N -  
0x828d CFARepeatPatternDim N -  
0x828e CFAPattern2 N -  
0x828f BatteryLevel N -  
0x8290 KodakIFD - - Kodak IFD Tags
(used in various types of Kodak images)
0x8298 Copyright string IFD0  
0x829a ExposureTime rational64u ExifIFD  
0x829d FNumber rational64u ExifIFD  
0x82a5 MDFileTag N - (tags 0x82a5-0x82ac are used in Molecular Dynamics GEL files)
0x82a6 MDScalePixel N -  
0x82a7 MDColorTable N -  
0x82a8 MDLabName N -  
0x82a9 MDSampleInfo N -  
0x82aa MDPrepDate N -  
0x82ab MDPrepTime N -  
0x82ac MDFileUnits N -  
0x830e PixelScale N -  
0x83bb IPTC-NAA int32u IFD0 IPTC Tags
0x847e IntergraphPacketData N -  
0x847f IntergraphFlagRegisters N -  
0x8480 IntergraphMatrix N -  
0x8482 ModelTiePoint N -  
0x84e0 Site N -  
0x84e1 ColorSequence N -  
0x84e2 IT8Header N -  
0x84e3 RasterPadding N -  
0x84e4 BitsPerRunLength N -  
0x84e5 BitsPerExtendedRunLength N -  
0x84e6 ColorTable N -  
0x84e7 ImageColorIndicator N -  
0x84e8 BackgroundColorIndicator N -  
0x84e9 ImageColorValue N -  
0x84ea BackgroundColorValue N -  
0x84eb PixelIntensityRange N -  
0x84ec TransparencyIndicator N -  
0x84ed ColorCharacterization N -  
0x84ee HCUsage N -  
0x84ef TrapIndicator N -  
0x84f0 CMYKEquivalent N -  
0x8546 SEMInfo string IFD0 (found in some scanning electron microscope images)
0x8568 AFCP_IPTC - - IPTC Tags
0x85d8 ModelTransform N -  
0x8602 WB_GRGBLevels N - (found in IFD0 of Leaf MOS images)
0x8606 LeafData - - Leaf Tags
0x8649 PhotoshopSettings - - Photoshop Tags
0x8769 ExifOffset - -  
0x8773 ICC_Profile - - ICC_Profile Tags
0x87ac ImageLayer N -  
0x87af GeoTiffDirectory N -  
0x87b0 GeoTiffDoubleParams N -  
0x87b1 GeoTiffAsciiParams N -  
0x8822 ExposureProgram int16u ExifIFD 0 = Not Defined
1 = Manual
2 = Program AE
3 = Aperture-priority AE
4 = Shutter speed priority AE
5 = Creative (Slow speed)
6 = Action (High speed)
7 = Portrait
8 = Landscape
0x8824 SpectralSensitivity string ExifIFD  
0x8825 GPSInfo - - GPS Tags
0x8827 ISO int16u ExifIFD (called ISOSpeedRatings by the EXIF spec)
0x8828 Opto-ElectricConvFactor N - (called OECF by the EXIF spec)
0x8829 Interlace N -  
0x882a TimeZoneOffset int16s[n] ExifIFD (1 or 2 values: 1. The time zone offset of DateTimeOriginal from GMT in hours, 2. If present, the time zone offset of ModifyDate)
0x882b SelfTimerMode int16u ExifIFD  
0x885c FaxRecvParams N -  
0x885d FaxSubAddress N -  
0x885e FaxRecvTime N -  
0x888a LeafSubIFD - - Leaf SubIFD Tags
0x9000 ExifVersion undef ExifIFD  
0x9003 DateTimeOriginal string ExifIFD  
0x9004 CreateDate string ExifIFD (called DateTimeDigitized by the EXIF spec)
0x9101 ComponentsConfiguration undef ExifIFD  
0x9102 CompressedBitsPerPixel rational64u ExifIFD  
0x9201 ShutterSpeedValue rational64s ExifIFD  
0x9202 ApertureValue rational64u ExifIFD  
0x9203 BrightnessValue rational64s ExifIFD  
0x9204 ExposureCompensation rational64s ExifIFD  
0x9205 MaxApertureValue rational64u ExifIFD  
0x9206 SubjectDistance rational64u ExifIFD  
0x9207 MeteringMode int16u ExifIFD 0 = Unknown
1 = Average
2 = Center-weighted average
3 = Spot
4 = Multi-spot
5 = Multi-segment
6 = Partial
255 = Other
0x9208 LightSource int16u ExifIFD 0 = Unknown
1 = Daylight
2 = Fluorescent
3 = Tungsten
4 = Flash
9 = Fine Weather
10 = Cloudy
11 = Shade
12 = Daylight Fluorescent
13 = Day White Fluorescent
14 = Cool White Fluorescent
15 = White Fluorescent
17 = Standard Light A
18 = Standard Light B
19 = Standard Light C
20 = D55
21 = D65
22 = D75
23 = D50
24 = ISO Studio Tungsten
255 = Other
0x9209 Flash int16u ExifIFD 0x0 = No Flash
0x1 = Fired
0x5 = Fired, Return not detected
0x7 = Fired, Return detected
0x8 = On, Did not fire
0x9 = On
0xd = On, Return not detected
0xf = On, Return detected
0x10 = Off
0x14 = Off, Did not fire, Return not detected
0x18 = Auto, Did not fire
0x19 = Auto, Fired
0x1d = Auto, Fired, Return not detected
0x1f = Auto, Fired, Return detected
0x20 = No flash function
0x30 = Off, No flash function
0x41 = Fired, Red-eye reduction
0x45 = Fired, Red-eye reduction, Return not detected
0x47 = Fired, Red-eye reduction, Return detected
0x49 = On, Red-eye reduction
0x4d = On, Red-eye reduction, Return not detected
0x4f = On, Red-eye reduction, Return detected
0x50 = Off, Red-eye reduction
0x58 = Auto, Did not fire, Red-eye reduction
0x59 = Auto, Fired, Red-eye reduction
0x5d = Auto, Fired, Red-eye reduction, Return not detected
0x5f = Auto, Fired, Red-eye reduction, Return detected
0x920a FocalLength rational64u ExifIFD  
0x920b FlashEnergy N -  
0x920c SpatialFrequencyResponse N -  
0x920d Noise N -  
0x920e FocalPlaneXResolution N -  
0x920f FocalPlaneYResolution N -  
0x9210 FocalPlaneResolutionUnit N - 1 = None
2 = inches
3 = cm
4 = mm
5 = um
0x9211 ImageNumber int32u ExifIFD  
0x9212 SecurityClassification string ExifIFD 'C' = Confidential
'R' = Restricted
'S' = Secret
'T' = Top Secret
'U' = Unclassified
0x9213 ImageHistory string ExifIFD  
0x9214 SubjectLocation int16u[4] ExifIFD  
0x9215 ExposureIndex N -  
0x9216 TIFF-EPStandardID N -  
0x9217 SensingMethod N - 1 = Monochrome area
2 = One-chip color area
3 = Two-chip color area
4 = Three-chip color area
5 = Color sequential area
6 = Monochrome linear
7 = Trilinear
8 = Color sequential linear
0x923f StoNits N -  
0x9286 UserComment undef ExifIFD  
0x9290 SubSecTime string ExifIFD  
0x9291 SubSecTimeOriginal string ExifIFD  
0x9292 SubSecTimeDigitized string ExifIFD  
0x935c ImageSourceData undef IFD0  
0x9c9b XPTitle int8u IFD0 (tags 0x9c9b-0x9c9f are used by Windows Explorer; special characters in these values are converted to UTF-8 by default, or Windows Latin1 with the -L option. XPTitle is ignored by Windows Explorer if ImageDescription exists)
0x9c9c XPComment int8u IFD0  
0x9c9d XPAuthor int8u IFD0 (ignored by Windows Explorer if Artist exists)
0x9c9e XPKeywords int8u IFD0  
0x9c9f XPSubject int8u IFD0  
0xa000 FlashpixVersion undef ExifIFD  
0xa001 ColorSpace int16u ExifIFD (the value of 2 is not standard EXIF. Instead, an Adobe RGB image is indicated by "Uncalibrated" with an InteropIndex of "R03")
1 = sRGB
2 = Adobe RGB
65535 = Uncalibrated
0xa002 ExifImageWidth int16u ExifIFD (called PixelXDimension by the EXIF spec)
0xa003 ExifImageHeight int16u ExifIFD (called PixelYDimension by the EXIF spec)
0xa004 RelatedSoundFile string ExifIFD  
0xa005 InteropOffset - -  
0xa20b FlashEnergy rational64u[n] ExifIFD  
0xa20c SpatialFrequencyResponse N -  
0xa20d Noise N -  
0xa20e FocalPlaneXResolution rational64u ExifIFD  
0xa20f FocalPlaneYResolution rational64u ExifIFD  
0xa210 FocalPlaneResolutionUnit int16u ExifIFD 1 = None
2 = inches
3 = cm
4 = mm
5 = um
0xa211 ImageNumber N -  
0xa212 SecurityClassification N -  
0xa213 ImageHistory N -  
0xa214 SubjectLocation int16u[2] ExifIFD  
0xa215 ExposureIndex rational64u ExifIFD  
0xa216 TIFF-EPStandardID N -  
0xa217 SensingMethod int16u ExifIFD 1 = Not defined
2 = One-chip color area
3 = Two-chip color area
4 = Three-chip color area
5 = Color sequential area
7 = Trilinear
8 = Color sequential linear
0xa300 FileSource undef ExifIFD 1 = Film Scanner
2 = Reflection Print Scanner
3 = Digital Camera
"\x03\x00\x00\x00" = Sigma Digital Camera
0xa301 SceneType undef ExifIFD 1 = Directly photographed
0xa302 CFAPattern undef ExifIFD  
0xa401 CustomRendered int16u ExifIFD 0 = Normal
1 = Custom
0xa402 ExposureMode int16u ExifIFD 0 = Auto
1 = Manual
2 = Auto bracket
0xa403 WhiteBalance int16u ExifIFD 0 = Auto
1 = Manual
0xa404 DigitalZoomRatio rational64u ExifIFD  
0xa405 FocalLengthIn35mmFormat int16u ExifIFD (called FocalLengthIn35mmFilm by the EXIF spec)
0xa406 SceneCaptureType int16u ExifIFD 0 = Standard
1 = Landscape
2 = Portrait
3 = Night
0xa407 GainControl int16u ExifIFD 0 = None
1 = Low gain up
2 = High gain up
3 = Low gain down
4 = High gain down
0xa408 Contrast int16u ExifIFD 0 = Normal
1 = Low
2 = High
0xa409 Saturation int16u ExifIFD 0 = Normal
1 = Low
2 = High
0xa40a Sharpness int16u ExifIFD 0 = Normal
1 = Soft
2 = Hard
0xa40b DeviceSettingDescription N -  
0xa40c SubjectDistanceRange int16u ExifIFD 0 = Unknown
1 = Macro
2 = Close
3 = Distant
0xa420 ImageUniqueID string ExifIFD  
0xa480 GDALMetadata N -  
0xa481 GDALNoData N -  
0xa500 Gamma rational64u ExifIFD  
0xbc01 PixelFormat N - (tags 0xbc** are used in Windows HD Photo (HDP and WDP) images. The actual PixelFormat values are 16-byte GUID's but the leading 15 bytes, '6fddc324-4e03-4bfe-b1853-d77768dc9', have been removed below to avoid unnecessary clutter)
0x5 = Black & White
0x8 = 8-bit Gray
0x9 = 16-bit BGR555
0xa = 16-bit BGR565
0xb = 16-bit Gray
0xc = 24-bit BGR
0xd = 24-bit RGB
0xe = 32-bit BGR
0xf = 32-bit BGRA
0x10 = 32-bit PBGRA
0x11 = 32-bit Gray Float
0x12 = 48-bit RGB Fixed Point
0x13 = 32-bit BGR101010
0x15 = 48-bit RGB
0x16 = 64-bit RGBA
0x17 = 64-bit PRGBA
0x18 = 96-bit RGB Fixed Point
0x19 = 128-bit RGBA Float
0x1a = 128-bit PRGBA Float
0x1b = 128-bit RGB Float
0x1c = 32-bit CMYK
0x1d = 64-bit RGBA Fixed Point
0x1e = 128-bit RGBA Fixed Point
0x1f = 64-bit CMYK
0x20 = 24-bit 3 Channels
0x21 = 32-bit 4 Channels
0x22 = 40-bit 5 Channels
0x23 = 48-bit 6 Channels
0x24 = 56-bit 7 Channels
0x25 = 64-bit 8 Channels
0x26 = 48-bit 3 Channels
0x27 = 64-bit 4 Channels
0x28 = 80-bit 5 Channels
0x29 = 96-bit 6 Channels
0x2a = 112-bit 7 Channels
0x2b = 128-bit 8 Channels
0x2c = 40-bit CMYK Alpha
0x2d = 80-bit CMYK Alpha
0x2e = 32-bit 3 Channels Alpha
0x2f = 40-bit 4 Channels Alpha
0x30 = 48-bit 5 Channels Alpha
0x31 = 56-bit 6 Channels Alpha
0x32 = 64-bit 7 Channels Alpha
0x33 = 72-bit 8 Channels Alpha
0x34 = 64-bit 3 Channels Alpha
0x35 = 80-bit 4 Channels Alpha
0x36 = 96-bit 5 Channels Alpha
0x37 = 112-bit 6 Channels Alpha
0x38 = 128-bit 7 Channels Alpha
0x39 = 144-bit 8 Channels Alpha
0x3a = 64-bit RGBA Half
0x3b = 48-bit RGB Half
0x3d = 32-bit RGBE
0x3e = 16-bit Gray Half
0x3f = 32-bit Gray Fixed Point
0xbc02 Transformation N - 0 = Horizontal (normal)
1 = Mirror vertical
2 = Mirror horizontal
3 = Rotate 180
4 = Rotate 90 CW
5 = Mirror horizontal and rotate 90 CW
6 = Mirror horizontal and rotate 270 CW
7 = Rotate 270 CW
0xbc03 Uncompressed N - 0 = No
1 = Yes
0xbc04 ImageType N - Bit 0 = Preview
Bit 1 = Page
0xbc80 ImageWidth N -  
0xbc81 ImageHeight N -  
0xbc82 WidthResolution N -  
0xbc83 HeightResolution N -  
0xbcc0 ImageOffset N -  
0xbcc1 ImageByteCount N -  
0xbcc2 AlphaOffset N -  
0xbcc3 AlphaByteCount N -  
0xbcc4 ImageDataDiscard N - 0 = Full Resolution
1 = Flexbits Discarded
2 = HighPass Frequency Data Discarded
3 = Highpass and LowPass Frequency Data Discarded
0xbcc5 AlphaDataDiscard N - 0 = Full Resolution
1 = Flexbits Discarded
2 = HighPass Frequency Data Discarded
3 = Highpass and LowPass Frequency Data Discarded
0xc427 OceScanjobDesc N -  
0xc428 OceApplicationSelector N -  
0xc429 OceIDNumber N -  
0xc42a OceImageLogic N -  
0xc44f Annotations N -  
0xc4a5 PrintIM undef IFD0 PrintIM Tags
0xc612 DNGVersion int8u[4] IFD0 (tags 0xc612-0xc65d are used in DNG images)
0xc613 DNGBackwardVersion int8u[4] IFD0  
0xc614 UniqueCameraModel string IFD0  
0xc615 LocalizedCameraModel string IFD0  
0xc616 CFAPlaneColor N -  
0xc617 CFALayout N - 1 = Rectangular
2 = Even columns offset down 1/2 row
3 = Even columns offset up 1/2 row
4 = Even rows offset right 1/2 column
5 = Even rows offset left 1/2 column
0xc618 LinearizationTable N -  
0xc619 BlackLevelRepeatDim N -  
0xc61a BlackLevel N -  
0xc61b BlackLevelDeltaH N -  
0xc61c BlackLevelDeltaV N -  
0xc61d WhiteLevel N -  
0xc61e DefaultScale rational64u[2] SubIFD  
0xc61f DefaultCropOrigin int32u[2] SubIFD  
0xc620 DefaultCropSize int32u[2] SubIFD  
0xc621 ColorMatrix1 N -  
0xc622 ColorMatrix2 N -  
0xc623 CameraCalibration1 N -  
0xc624 CameraCalibration2 N -  
0xc625 ReductionMatrix1 N -  
0xc626 ReductionMatrix2 N -  
0xc627 AnalogBalance N -  
0xc628 AsShotNeutral N -  
0xc629 AsShotWhiteXY rational64u[2] IFD0  
0xc62a BaselineExposure rational64s IFD0  
0xc62b BaselineNoise rational64u IFD0  
0xc62c BaselineSharpness rational64u IFD0  
0xc62d BayerGreenSplit int32u SubIFD  
0xc62e LinearResponseLimit rational64u IFD0  
0xc62f CameraSerialNumber string IFD0  
0xc630 DNGLensInfo rational64u[4] IFD0  
0xc631 ChromaBlurRadius rational64u SubIFD  
0xc632 AntiAliasStrength rational64u SubIFD  
0xc633 ShadowScale rational64u IFD0  
0xc634 SR2Private
DNGAdobeData
DNGPentaxData
DNGPrivateData
-
-
-
N
-
-
-
-
 
0xc635 MakerNoteSafety int16u IFD0 0 = Unsafe
1 = Safe
0xc640 RawImageSegmentation N - (used in segmented Canon CR2 images. 3 numbers: 1. Number of segments minus one; 2. Pixel width of segments except last; 3. Pixel width of last segment)
0xc65a CalibrationIlluminant1 int16u IFD0 0 = Unknown
1 = Daylight
2 = Fluorescent
3 = Tungsten
4 = Flash
9 = Fine Weather
10 = Cloudy
11 = Shade
12 = Daylight Fluorescent
13 = Day White Fluorescent
14 = Cool White Fluorescent
15 = White Fluorescent
17 = Standard Light A
18 = Standard Light B
19 = Standard Light C
20 = D55
21 = D65
22 = D75
23 = D50
24 = ISO Studio Tungsten
255 = Other
0xc65b CalibrationIlluminant2 int16u IFD0 0 = Unknown
1 = Daylight
2 = Fluorescent
3 = Tungsten
4 = Flash
9 = Fine Weather
10 = Cloudy
11 = Shade
12 = Daylight Fluorescent
13 = Day White Fluorescent
14 = Cool White Fluorescent
15 = White Fluorescent
17 = Standard Light A
18 = Standard Light B
19 = Standard Light C
20 = D55
21 = D65
22 = D75
23 = D50
24 = ISO Studio Tungsten
255 = Other
0xc65c BestQualityScale rational64u SubIFD  
0xc65d RawDataUniqueID int8u[16] IFD0  
0xc660 AliasLayerMetadata N - (used by Alias Sketchbook Pro, not a DNG tag)
0xc68b OriginalRawFileName string IFD0  
0xc68c OriginalRawFileData undef IFD0 DNG OriginalRaw Tags
0xc68d ActiveArea int32u[4] SubIFD  
0xc68e MaskedAreas int32u[4] SubIFD  
0xc68f AsShotICCProfile undef IFD0 ICC_Profile Tags
0xc690 AsShotPreProfileMatrix rational64s[n] IFD0  
0xc691 CurrentICCProfile undef IFD0 ICC_Profile Tags
0xc692 CurrentPreProfileMatrix rational64s[n] IFD0  
0xea1c Padding undef ExifIFD  
0xea1d OffsetSchema int32s ExifIFD (Microsoft's ill-conceived maker note offset difference)
0xfde8 OwnerName string ExifIFD (tags 0xfde8-0xfe58 are generated by Photoshop Camera RAW -- some names are the same as other EXIF tags, but ExifTool will avoid writing these unless they already exist in the file)
0xfde9 SerialNumber string ExifIFD  
0xfdea Lens string ExifIFD  
0xfe4c RawFile string ExifIFD  
0xfe4d Converter string ExifIFD  
0xfe4e WhiteBalance string ExifIFD  
0xfe51 Exposure string ExifIFD  
0xfe52 Shadows string ExifIFD  
0xfe53 Brightness string ExifIFD  
0xfe54 Contrast string ExifIFD  
0xfe55 Saturation string ExifIFD  
0xfe56 Sharpness string ExifIFD  
0xfe57 Smoothness string ExifIFD  
0xfe58 MoireFilter string ExifIFD  

The following table compares the maximum sizes and numbers of various objects defined in SQL Server 7.0, SQL Server 2000 and SQL Server 2005 databases or referenced in Transact-SQL statements. The table does not include Microsoft SQL Server 2000 Windows CE Edition and Microsoft SQL Server 2005 Windows CE Edition.

Object SQL Server 7.0 SQL Server 2000 SQL Server 2005 (32-bit)
Batch size 65,536 * Network Packet Size1 65,536 * Network Packet Size1 65,536 * Network Packet Size1
Bytes per short string column 8,000 8,000 8,000
Bytes per text, ntext, or image column 2 GB-2 2 GB-2 2 GB-2
Bytes per GROUP BY, ORDER BY 8,060 8,060 8,060
Bytes per index 900 9002 9002
Bytes per foreign key 900 900 900
Bytes per primary key 900 900 900
Bytes per row 8,060 8,060 8,0608
Bytes in source text of a stored procedure Lesser of batch size or 250 MB Lesser of batch size or 250 MB Lesser of batch size or 250 MB
Bytes per VARCHAR(MAX), VARBINARY(MAX), XML, TEXT, or IMAGEcolumn N/A N/A 2^31-1
Characters per NTEXT or NVARCHAR(MAX) column. N/A N/A 2^30-1
Clustered indexes per table 1 1 1
Columns in GROUP BY, ORDER BY Limited only by number of bytes per GROUP BY, ORDER BY Limited only by number of bytes per GROUP BY, ORDER BY Limited only by number of bytes per GROUP BY, ORDER BY
Columns or expressions in a GROUP BY WITH CUBE or WITH ROLLUP statement 10 10 10
Columns per index 16 16 167
Columns per foreign key 16 16 16
Columns per primary key 16 16 16
Columns per base table 1,024 1,024 1,024
Columns per SELECT statement 4,096 4,096 4,096
Columns per INSERT statement 1,024 1,024 1,024
Connections per client Maximum value of configured connections Maximum value of configured connections Maximum value of configured connections
Database size 1,048,516 TB 1,048,516 TB 1,048,516 TB
Databases per instance of SQL Server 32,767 32,767 32,767
Filegroups per database 256 256 32,767
Files per database 32,767 32,767 32,767
File size (data) 32 TB 32 TB 16 TB
File size (log) 4 TB 32 TB 2 terabytes
Foreign key table references per table4 253 253 253
Identifier length (in characters) 128 128 128
Instances per computer N/A 16 16
Length of a string containing SQL Statements (batch size) 65,536 * Network packet size 1 65,536 * Network packet size 1 65,536 * Network packet size 1
Locks per connection Maximum locks per server Maximum locks per server Maximum locks per server
Locks per instance of SQL Server 2,147,483,647 (static) 40% of SQL Server memory (dynamic) 2,147,483,647 (static) 40% of SQL Server memory (dynamic) Up to 2,147,483,6475
Nested stored procedure levels6 32 32 32
Nested subqueries 32 32 32
Nested trigger levels 32 32 32
Nonclustered indexes per table 249 249 249
Objects concurrently open in an instance of SQL Server3 2,147,483,647 (or available memory) 2,147,483,647 (or available memory)  
Objects in a database 2,147,483,6473 2,147,483,6473 2,147,483,6473
Parameters per stored procedure 1,024 1,024 2,100
Parameters per user-defined function 1,024 1,024 2,100
Partitions per partitioned table or index N/A N/A 1,000
REFERENCES per table 253 253 253
Rows per table Limited by available storage Limited by available storage Limited by available storage
Statistics on non-indexed columns     2,000
Tables per database Limited by number of objects in a database3 Limited by number of objects in a database3 Limited by number of objects in a database3
Tables per SELECT statement 256 256 256
Triggers per table Limited by number of objects in a database3 Limited by number of objects in a database3 Limited by number of objects in a database3
UNIQUE indexes or constraints per table 249 nonclustered and 1 clustered 249 nonclustered and 1 clustered 249 nonclustered and 1 clustered
XML indexes N/A N/A 249

1 Network Packet Size is the size of the tabular data stream (TDS) packets used to communicate between applications and the relational database engine. The default packet size is 4 kilobytes (KB), and is controlled by the network packet size configuration option.

2 The maximum number of bytes in any index key cannot exceed 900 in SQL Server 2000 and SQL Server 2005. You can define a key using variable-length columns whose maximum sizes add up to more than 900, provided no row is ever inserted with more than 900 bytes of data in those columns. In SQL Server 2005, you can include nonkey columns in a nonclustered index to avoid the maximum index key size of 900 bytes.

3 Database objects include objects such as tables, views, stored procedures, extended stored procedures, user-defined functions, triggers, rules, defaults, and constraints. The sum of the number of all objects in a database cannot exceed 2,147,483,647.

4 Although a table can contain an unlimited number of FOREIGN KEY constraints, the recommended maximum is 253. Depending on the hardware configuration hosting SQL Server, specifying additional foreign key constraints may be expensive for the query optimizer to process.

5 This value is for static lock allocation. Dynamic locks are limited only by memory.

6 If a stored procedure accesses more than 8 databases, or more than 2 databases in interleaving, you will receive an error.

7 If the table contains one or more XML indexes, the clustering key of the user table is limited to 15 columns because the XML column is added to the clustering key of the primary XML index. In SQL Server 2005, you can include nonkey columns in a nonclustered index to avoid the limitation of a maximum of 16 key columns.

8 SQL Server 2005 supports row-overflow storage which enables variable length columns to be pushed off-row. Only a 24-byte root is stored in the main record for variable length columns pushed out of row; because of this, the effective row limit is higher than in previous releases of SQL Server.

select
    @@CONNECTIONS CONNECTIONS,
    @@CPU_BUSY CPU_BUSY,
    @@CURSOR_ROWS CURSOR_ROWS,
    @@DATEFIRST DATEFIRST,
    @@DBTS DBTS,
    @@ERROR ERROR,
    @@FETCH_STATUS FETCH_STATUS,
    @@IDENTITY [IDENTITY],
    @@IDLE IDLE,
    @@IO_BUSY IO_BUSY,
    @@LANGID LANGID,
    @@LANGUAGE LANGUAGE,
    @@LOCK_TIMEOUT LOCK_TIMEOUT,
    @@MAX_CONNECTIONS MAX_CONNECTIONS,
    @@MAX_PRECISION MAX_PRECISION,
    @@NESTLEVEL NESTLEVEL,
    @@OPTIONS OPTIONS,
    @@PACK_RECEIVED PACK_RECEIVED,
    @@PACK_SENT PACK_SENT,
    @@PACKET_ERRORS PACKET_ERRORS,
    @@PROCID PROCID,
    @@REMSERVER REMSERVER,
    @@ROWCOUNT [ROWCOUNT],
    @@SERVERNAME SERVERNAME,
    @@SERVICENAME SERVICENAME,
    @@SPID SPID,
    @@TEXTSIZE [TEXTSIZE],
    @@TIMETICKS TIMETICKS,
    @@TOTAL_ERRORS TOTAL_ERRORS,
    @@TOTAL_READ TOTAL_READ,
    @@TOTAL_WRITE TOTAL_WRITE,
    @@TRANCOUNT TRANCOUNT,
    @@VERSION VERSION

Style ID Style Type
0 or 100 mon dd yyyy hh:miAM (or PM)
101 mm/dd/yy
102 yy.mm.dd
103 dd/mm/yy
104 dd.mm.yy
105 dd-mm-yy
106 dd mon yy
107 Mon dd, yy
108 hh:mm:ss
9 or 109 mon dd yyyy hh:mi:ss:mmmAM (or PM)
110 mm-dd-yy
111 yy/mm/dd
112 yymmdd
13 or 113 dd mon yyyy hh:mm:ss:mmm (24h)
114 hh:mi:ss:mmm (24h)
20 or 120 yyyy-mm-dd hh:mi:ss (24h)
21 or 121 yyyy-mm-dd hh:mi:ss.mmm (24h)
126 yyyy-mm-dd Thh:mm:ss.mmm (no spaces)
130 dd mon yyyy hh:mi:ss:mmmAM
131 dd/mm/yy hh:mi:ss:mmmAM
Find text in a job
				select
					a.name job_name,
					b.step_id,
					b.step_name,
					b.command
				from
					msdb..sysjobs a inner join msdb..sysjobsteps b on a.job_id = b.job_id
				where
					command like '%TEXT_TO_FIND%'
				


Get all date & time formats
				declare @Loop int
				set @Loop = -1
				declare @table table
				(
					[Date] nvarchar(50) not null,
					[Param] int not null
				)
				while @Loop <= 150
				begin
							 set @Loop = @Loop   1
					begin try
						insert into @table
						select convert(nvarchar, getdate(), @Loop), @Loop
					end try
					begin catch
						continue
					end catch
				end
				select * from @table
				


Find all jobs
				select
					a.name,
					a.description,
					b.database_name,
					b.step_id,
					b.step_name,
					b.command
				from
					msdb..sysjobs a inner join msdb..sysjobsteps b on a.job_id = b.job_id
				where
					a.enabled = 1
				order by
					b.database_name,
					a.name,
					b.step_id
				


Job Details
				exec msdb..sp_help_job @job_name = 'NAME_OF_JOB' ,@job_aspect = N'job'


Reset table identity columns
				dbcc checkident ('TABLE', reseed, 0)


Compatability Level
				exec sp_dbcmptlevel 'DATABASE'


Information Schema
				select
					routine_name,
					routine_definition
				from
					information_schema.routines
				where
					routine_definition like '%STRING_TO_FIND%'
					and routine_type = 'procedure'
				


 

Count rows in all tables
				select
					a.name [Table],
					max(b.rows) [Count]
				from
					sysobjects a inner join sysindexes b on b.id = OBJECT_ID(a.name)
				where
					a.xtype = 'U'
				group by
					a.name
				


Various System
				sp_who
				sp_who @@SPID
				select * 
				from master..sysprocesses
				where spid=@@SPID
				select nt_username, hostname, nt_domain, loginame, login_time, program_name
				from master..sysprocesses
				where spid=@@SPID
				exec sp_depends 'OBECT_NAME'
				select name, text 
				from syscomments c join sysobjects o on c.id = o.id
				where text like '%OBECT_NAME%'
				-- Displays the number of milliseconds required to parse, compile
				-- and execute each statement.
				set statistics time on
				-- Causes SQL Server to display information regarding the amount
				-- of disk activity generated by Transact-SQL statements.
				set statistics io on
				-- Blocks the execution of a batch, stored procedure, or transaction
				-- until a specified time or time interval is reached, or a specified
				-- statement modifies or returns at least one row.
				waitfor delay '00:00:00.000'
				-- Always use a new query plan.
				with recompile
ALLUSERSPROFILE Local returns the location of the All Users Profile.
APPDATA Local returns the location where applications store data by default.
CD Local returns the current directory string.
CMDCMDLINE Local returns the exact command line used to start the current cmd.exe.
CMDEXTVERSION System returns the version number of the current Command Processor Extensions.
COMPUTERNAME System returns the name of the computer.
COMSPEC System returns the exact path to the command shell executable.
DATE System returns the current date. This variable uses the same format as the date /t command. Cmd.exe generates this variable. For more information about the date command, see the Date command.
ERRORLEVEL System returns the error code of the most recently used command. A non-0 value usually indicates an error.
HOMEDRIVE System returns which local workstation drive letter is connected to the user's home directory. This variable is set based on the value of the home directory. The user's home directory is specified in Local Users and Groups.
HOMEPATH System returns the full path of the user's home directory. This variable is set based on the value of the home directory. The user's home directory is specified in Local Users and Groups.
HOMESHARE System returns the network path to the user's shared home directory. This variable is set based on the value of the home directory. The user's home directory is specified in Local Users and Groups.
LOGONSEVER Local returns the name of the domain controller that validated the current logon session.
NUMBER_OF_PROCESSORS System specifies the number of processors installed on the computer.
OS System returns the OS name. Windows XP and Windows 2000 display the OS as Windows_NT.
PATH System specifies the search path for executable files.
PATHEXT System returns a list of the file extensions that the OS considers to be executable.
PROCESSOR_ARCHITECTURE System returns the processor's chip architecture. Values: x86, IA64.
PROCESSOR_IDENTFIER System returns a description of the processor.
PROCESSOR_LEVEL System returns the model number of the computer's processor.
PROCESSOR_REVISION System returns the revision number of the processor.
PROMPT Local returns the command-prompt settings for the current interpreter. Cmd.exe generates this variable.
RANDOM System returns a random decimal number between 0 and 32767. Cmd.exe generates this variable.
SYSTEMDRIVE System returns the drive containing the Windows root directory (i.e., the system root).
SYSTEMROOT System returns the location of the Windows root directory.
TEMP System and User return the default temporary directories for applications that are available to users who are currently logged on. Some applications require TEMP and others require TMP.
TIME System returns the current time. This variable uses the same format as the time /t command. Cmd.exe generates this variable. For more information about the time command, see the Time command.
USERDOMAIN Local returns the name of the domain that contains the user's account.
USERNAME Local returns the name of the user currently logged on.
USERPROFILE Local returns the location of the profile for the current user.
WINDIR System returns the location of the OS directory
TMP System and User return the default temporary directories for applications that are available to users who are currently logged on. Some applications require TEMP and others require TMP.