Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert 2 number columns to a date

Status
Not open for further replies.

ScanX

Programmer
Oct 13, 2003
26
BE
Hello,
I have a table with 2 columns :
month_of_birth
year_of_birth

both are number datatype

I would like to have them converted into date datatype in the select (using a casting) and if possible into this format : "mmm yyyy"

Thanx in advance

Mika
 
Try
Code:
select DATEFORMAT(string(year_of_birth
,'-01-',month_of_birth), 'Mmm yyyy') from TABLE

Hope this helps,

David.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top