In Teradata, there are various components which make timestamp value in a column. This includes Date part: Year, Month and Day and Time part which includes hour, minutes and seconds. Let us see below all the various formats available for these components:
# | Type | Format | Value | Description |
---|---|---|---|---|
1 | Year | YY | 14 | 2 digits of century |
2 | Year | YYYY | 2014 | complete year |
3 | Year | Y4 | 2014 | complete year |
4 | Month | MM | 11 | 2 digit month |
5 | Month | MMM | Nov | short form of month |
6 | Month | MMMM | November | full name of month |
7 | Day | DD | 12 | 2 digit date |
8 | Day | DDD | 316 | day of the year |
9 | Hour | HH | 02 | Hour |
10 | Minute | MI | 59 | Minute |
11 | Second | SS | 07 | Second |
12 | Time Period | T | AM | AM or PM |
13 | Blank | B | SPACE | Specify Space |
You can use combination of above mentioned formats to show your date, time or timestamp values.