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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Expression, how do I convert a number to a date

Status
Not open for further replies.

mwhalen

Programmer
Oct 31, 2000
217
CA
I have never used SQL Expressions before but I think this is the best route. Does anyone know how to convert a number field to a date format - specifically year? I looked at the CONVERT function but I'm not sure what the second part of that should be. THanks.
 
Rather than convert the number to a date, why not just extract the YEAR from the date and use that as a number?

From memory, Oracle has YEAR function you can use in an SQL expression Editor and Publisher of Crystal Clear
 
I don't know about any YEAR function in Oracle. But you can use the TO_CHAR function for that.
 
You are using an oracle number field to store what kind of date? Seconds from 1970 or days from 200? (rather than the date field) Give me an example of a date if you can
 
I think he sorted this in thread766-416311. It wasn't a number field storing a date, it was a number field storing a 4 digit integer representing the year.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top