Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
6Activity
0 of .
Results for:
No results containing your search query
P. 1
Conversion of Oracle TO Mysql

Conversion of Oracle TO Mysql

Ratings:

5.0

(1)
|Views: 2,188 |Likes:
Published by Muthukumar.T

More info:

Published by: Muthukumar.T on May 15, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

08/30/2011

pdf

text

original

 
Conversion of Oracle TO_CHAR(datetime) with format string to MySQL
The Oracle TO_CHAR(
datetime
,
fmt 
) function converts datetime values to a string in the format specified by the fmt option.MySQL has the DATE_FORMAT function that allows datetime values converting to a string in the specified format.SQLWays converts the Oracle TO_CHAR function to the MySQL DATE_FORMAT function and converts elements of formatstring from Oracle to corresponding specifier in MySQL as specified in the following table
TABLE 45. Conversion of Oracle TO_CHAR(datetime) with format string to MySQL
Mapping of datetime format specifiers between MySQL and OracleMySQLOracle (independently fromregister)Description
%a 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%eDDDay of the month, numeric ((00..31) and (0..31))%j DDD Day of year (001..366)%m%cMM 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%lHHHH12Hour ((01..12) and (1..12))%H%kHH24 Hour ((00..23) and (0..23))%pAMPMAM or PM%r - Time, 12-hour (hh:mm:ss followed by AM or PM)%S%sSS Seconds ((00..59) and (0..59))%T - Time, 24-hour (hh:mm:ss)%uWWIWWeek (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%vWWIWWeek (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%YYYYYSYYYYIYYYYear, numeric, 4 digits%yYYIYYYear, 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:

Activity (6)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
hassan_wah liked this
Alex Zhirov liked this
Alex Zhirov liked this
Nerella Kittu liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->