File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date function in Ingres DB

 
Gabriel Tomoloju
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys,
How do i do i check in my where clause if:
a date_field in a table is less that 3 past months from today.
Note: I am using INGRES DATABASE

select * from tablename
where
date_field is less that 3 months from today.


Thanks.
[ August 18, 2004: Message edited by: Bear Bibeault ]
 
Julian Kennedy
Ranch Hand
Posts: 823
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Gabriel,

It's a long time since I've used Ingres (6 or 7 years!), but if memory serves you can do it with something mad like:

It might be today() without the quotes, however. I'm pretty sure that today - 3 is 3 days ago. Try it.

Anyway, Ingres date stuff is (or was, at least) done using really nasty implicit conversion from strings. It makes the code read OK though.

Hope this helps.

Jules
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic