Skip to main content
ExLibris

Knowledge Assistant

BETA
 
  • Subscribe by RSS
  • Back
    Aleph

     

    Ex Libris Knowledge Center
    1. Search site
      Go back to previous article
      1. Sign in
        • Sign in
        • Forgot password
    1. Home
    2. Aleph
    3. Knowledge Articles
    4. Today's date in SQL

    Today's date in SQL

    1. Last updated
    2. Save as PDF
    3. Share
      1. Share
      2. Tweet
      3. Share
    1. Additional Information
    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Description:
    You want to compare a certain value to today's date (or to today's date - x days) in SQL.

    Resolution:
    The variable you use is "SYSDATE". But to compare it to a standard ALEPH 8-character date, you need to include a TO_CHAR:

    SQL> select z36_rec_key, z36_id from z36 where z36_loan_date = TO_CHAR (SYSDATE, 'YYYYMMDD');

    [The preceding query will give you a list of item-keys/user-ids for items checked out today.]

    Additional Information

    date, SQL, current date


    • Article last edited: 10/8/2013
    View article in the Exlibris Knowledge Center
    1. Back to top
      • Today's date in generic fix routine
      • Toggling between Item tab and record tab in the Catalog module
    • Was this article helpful?

    Recommended articles

    1. Article type
      Topic
      Language
      English
      Product
      Aleph
    2. Tags
      1. 20
      2. contype:kba
      3. Prod:Aleph
      4. Type:General
    1. © Copyright 2025 Ex Libris Knowledge Center
    2. Powered by CXone Expert ®
    • Term of Use
    • Privacy Policy
    • Contact Us
    2025 Ex Libris. All rights reserved