Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert DD-Mon-YYYY to DD/MM/YYYY

I need to convert dt_of_birth [varchar] (15) which is in the format DD-Mon-YYYY to DD/MM/YYYY.

dt_of _birth is specified in different table and the conversion had to be done and stored in another table which has the same column name as dt_of_birth.

like image 377
user1771122 Avatar asked Oct 24 '12 12:10

user1771122


People also ask

How convert dd mm yyyy format to DD MMM YYYY?

First, pick the cells that contain dates, then right-click and select Format Cells. Select Custom in the Number Tab, then type 'dd-mmm-yyyy' in the Type text box, then click okay. It will format the dates you specify.

What is DD Mon YYYY format?

The standard date format for input and output is DD-MON-YY e.g., 01-JAN-17 which is controlled by the value of the NLS_DATE_FORMAT parameter. The following statement returns the current date with the standard date format by using the SYSDATE function.

How convert DD MM YY to DY Ye YY in Oracle?

Hi, if your input parameter is a date type then you can use the TO_CAHR convert function to get it in the dd-Mon-yy format.


2 Answers

Here

SELECT convert(datetime, '23/10/2016', 103) -- dd/mm/yyyy
like image 94
Diego Avatar answered Oct 05 '22 06:10

Diego


This will work

SELECT CONVERT(CHAR(11), CONVERT(SMALLDATETIME, '27-Jan-2011', 13), 103);
like image 45
Tariqulazam Avatar answered Oct 05 '22 07:10

Tariqulazam