Firebird Date Manipulation

Posted on 2006-04-23
Medium Priority
Last Modified: 2013-12-09
Hi All,

I need to get all rows which expire within 30 days.
It seems like Firebird does not support GetDate() etc...

I was looking for something like this, for example:

(ExpireDate >= DATE - 30)

BTW: "ExpireDate" is the database fieldname of type date
Question by:Marius0188
1 Comment
LVL 19

Accepted Solution

NickUpson earned 200 total points
ID: 16523256
dialect 1

SELECT * FROM TABLE1 WHERE ExpireDate >= (cast('TODAY' as DATE) - 30)

dialect 3

SELECT * FROM TABLE1 WHERE ExpireDate >= (cast('CURRENT_DATE' as DATE) - 30)

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question