Mapping of datetime format specifiers between MySQL and Oracle |
MySQL |
Oracle (independently from register) |
Description |
% |
Dy |
Abbreviated weekday name (Sun .. SAT) |
% B |
Mon |
Abbreviated month name (Jan .. dec) |
% D |
- |
Day of the month with English suffix (0th, 1st, 2nd, 3rd, etc .) |
% D% E |
Dd |
Day of the month, numeric (00 .. 31) and (0 .. 31 )) |
% J |
Ddd |
Day of year (001. 366) |
% M% C |
Mm |
Month, numeric (00 .. 12) and (0 .. 12 )) |
% M |
Month |
Month name (January... December) |
% F |
- |
Microseconds (000000 .. 999999) |
% I |
Mi |
Minutes, numeric (00 .. 59) |
% H% I% L |
HHHh12 |
Hour (01 .. 12) and (1 .. 12 )) |
% H% K |
Hh24 |
Hour (00 .. 23) and (0 .. 23 )) |
% P |
AMPM |
AM or PM |
% R |
- |
Time, 12-hour (HH: mm: SS followed by AM or pm) |
% S% S |
SS |
Seconds (00 .. 59) and (0 .. 59 )) |
% T |
- |
Time, 24-hour (HH: mm: SS) |
% U |
WWIW |
Week (00 .. 53), where Monday is the first day of week |
% U |
- |
Week (00 .. 53), where Sunday is the first day of week |
% V |
- |
Week (01 .. 53), where Sunday is the first day of week, used with % x |
% V |
WWIW |
Week (01 .. 53), where Monday is the first day of week, used with % x |
% W |
Day |
Weekday name (Sunday... Saturday) |
% W |
- |
Day of the week (0 = Sunday .. 6 = Saturday) |
% X |
- |
Year for the week, where Sunday is the first day of the week, numeric 4 digits; used with % v |
% X |
- |
Year for the week, where Monday is the first day of the week, numeric 4 digits; used with % v |
% Y |
YyyySyyyyIyyy |
Year, numeric, 4 digits |
% Y |
YYIyy |
Year, numeric, 2 digits |
- |
J |
Julian day; the number of days since January 1, 4712 BC. |
- |
Q |
Quarter of year (1, 2, 3, 4; Jan-MAR = 1 ). |
- |
Rr |
Given a year with 2 digits:· If the year is <50 and the last 2 digits of the current year are> = 50, then the first 2 digits of the returned year are 1 greater than the first 2 digits of the current year.· If the year is> = 50 and the last 2 digits of the current year are <50, then the first 2 digits of the returned year are 1 less than the first 2 digits of the current year. |
- |
Rrrr |
Round year. accepts either 4-digit or 2-digit input. if 2-digit, provides the same return as RR. if you don't want this functionality, then simply enter the 4-digit year. |
- |
W |
Week of month (1-5) where week 1 starts on the first day of the month and ends on the seventh. |
- |
Sssss |
Seconds past midnight (0-86399 ). |
- |
X |
Local Radix character. |
- |
Y, yyy |
Year with comma in the position. |
- |
YearSyear |
Year, spelled out; "S" prefixes BC dates "-". |
- |
Yyy |
3 digits of year. |
- |
Y |
1 digit of year. |
- |
Iy |
2 digits of ISO year. |
- |
I |
1 digit of ISO year. |
- |
AdA.D. |
Ad indicator with or without periods. |
- |
BCB .C. |
BC indicator with or without periods. |
- |
CCSCC |
One greater than the first two digits of a four-digit year; "S" prefixes BC dates "-".For example, '20' from '123 '. |
- |
D |
Day of week (1-7 ). |
- |
A.m.P. M. |
Meridian indicator with periods. |
- |
Tzh |
Time zone hour. |
- |
Tzm |
Time zone minute. |
- |
Tzr |
Time Zone region information. |
- |
Rm |
|