Ever wondered how to customize and display Date from “YYYY-MM-DD” format to “YYYYMMDD” format, Checkout the solution below and let me know if this worked for you..!!
Let me just display the default Date Entries from myaddressbook table below.
Now if you are trying to retrieve birthday details in YYYYDDMM format, execute the below command
SELECT birthday, REPLACE (birthday, '-','') as bday from myaddressbook;
From the above query as you can see Birthday column has the date details displayed in the default format and bday column displays the same date details in the customized format.
Let me just display the default Date Entries from myaddressbook table below.
Now if you are trying to retrieve birthday details in YYYYDDMM format, execute the below command
SELECT birthday, REPLACE (birthday, '-','') as bday from myaddressbook;
From the above query as you can see Birthday column has the date details displayed in the default format and bday column displays the same date details in the customized format.
Customize and Display Date in YYYYMMDD format
Reviewed by Suntaragali The Smart Techie
on
December 26, 2012
Rating:
Nice blog, very interesting to read
ReplyDeleteI have bookmarked this article page as i received good information from this.
Best ERP Software in Hyderabad
ERP Hyderabad
ERP Software Providers in Hyderabad