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

Fun with dates 1

Status
Not open for further replies.

LaurenM

Programmer
Jun 5, 2006
62
CA
Is there any way that I can do comparisons with just a year? What I am working on is a user enters a four digit year, i.e. 2006, now is there anyway I can do any date manipulation from that, specifically put 31/12/ in front of that? B/c if I can then all other date functions are possible. I have tried concating 31/12/ to the year inputted but that didn't work, unless I did it wrong. I welcome any thoughts and requests for clarification.

Lauren

Lauren McDonald, B.Sc.
Programmer Analyst
Saskatchewan Healthcare Employees' Pension Plan

 

Try using the TO_DATE() function:
Code:
TO_DATE(:YEAR||'1231','YYYYMMDD')
[3eyes]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Thanks!! It works great!

Lauren McDonald, B.Sc.
Programmer Analyst
Saskatchewan Healthcare Employees' Pension Plan

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top