Firebird Date Manipulation

Posted on 2006-04-23
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

    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)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Database tuning – How to start and what to tune. This question is frequently asked by many people, both online and offline. There is no hard and fast rule-of-thumb for performance tuning, however, before beginning the tuning process one should a…
    Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now