Home » RDBMS Server » Server Administration » Problem with dates
Problem with dates [message #51152] Fri, 03 May 2002 08:44 Go to next message
Olivier
Messages: 4
Registered: December 2000
Junior Member
Hi all,

Our data base is set like
date
01-05-00
in a column.
We would like to ask the user to enter a year
year :=&enter_year;
How can we do to use this year to find all the objects in our table related to this year?
Re: Problem with dates [message #51153 is a reply to message #51152] Fri, 03 May 2002 09:06 Go to previous messageGo to next message
Radek
Messages: 33
Registered: April 2002
Member
select * from your_table
where your_date between to_date('01-01-&enter_year 00:00:00','dd-mm-yyy hh24:mi:ss') and to_date('31-12-&enter_year 11:59:59','dd-mm-yyyy hh24:mi:ss')

expecting 4 digit year
cheers
Re: Problem with dates - Ooops small fixes [message #51154 is a reply to message #51152] Fri, 03 May 2002 09:08 Go to previous message
Radek
Messages: 33
Registered: April 2002
Member
select * from your_table
where your_date between to_date('01-01-&&enter_year 00:00:00','dd-mm-yyyy hh24:mi:ss') and to_date('31-12-&&enter_year 23:59:59','dd-mm-yyyy hh24:mi:ss')

expecting 4 digit year
cheers
Previous Topic: Re: Urgent Please :ORA-12500: TNS:listener failed to start a dedicated server process
Next Topic: Re: Oracle 9i
Goto Forum:
  


Current Time: Wed Dec 25 11:21:07 CST 2024