Date
Operation | Format | Description | Example |
---|---|---|---|
Convert to Date |
| Converts a specified value to a formatted date. | Input: Result: |
Next Day of Week |
| Returns the next occurrence of the specified day of the week for a specified date and time zone. | Input: Result: |
Previous Day of Week |
| Returns the previous occurrence of the specified day of the week for a specified date and time zone. | Input: Result: |
Format | Example |
---|---|
MM/dd/yyyy | 01/02/2018 |
dd MMMM yyyy | 02 January 2018 |
MMMM dd, yyyy | January 02, 2018 |
dd-M-yyyy hh:mm:ss | 02-1-2018 06:07:59 |
dd MMMM yyyy zzzz | 02 January 2018 India Standard Time |
E, dd MMM yyyy HH:mm:ss z | Tue, 02 Jan 2018 18:07:59 IST |
Character | Description | Examples |
---|---|---|
G | Era | CE |
y | Year |
|
M | Month |
|
w | Results in week in year | 16 |
W | Results in week in month | 3 |
D | Count of days in year | 266 |
d | Day of the month |
|
F | Day of the week in month | 4 |
E | Name of the day in the week |
|
u | Day number of week (based on Monday = 1) | 2 |
a | AM or PM period designation | AM |
H | Hour of the day (0-23) | 12 |
k | Hour of the day (1-24) | 24 |
K | AM hour of the day in 12-hour format (0-11) | 0 |
h | PM hour of the day in 12 hour format (1-12) | 12 |
m | Minute in the hour | 59 |
s | Second in the minute | 35 |
S | Millisecond in the minute | 978 |
z | Time zone |
|
Z | Time zone offset in hours (RFC format) | -0800 |
X | Time zone offset (ISO format) |
|