#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Location
    Goi‚nia,GO,Brazil
    Posts
    17
    Rep Power
    0

    Sum = date + days. Is it possible?


    Hello everyone.

    Is it possible for me to make a sum in which I have a date and a integer (the number of days)? Something like:

    newDate := dateOfBirth + 20;

    So, FB would know if the month and year would change with the sum. If dateOfBirth = 20/06/2004 newDate would be 10/07/2004 or sth.

    Is it possible to do something like this in FB?

    Thank you so much
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    249
    Rep Power
    14
    Did you try it? If so, how?

    These work fine for me:

    select current_date, current_date + 10,
    current_timestamp, current_timestamp + .5
    from rdb$database

    Returning the:
    current date
    current date + 10 days
    current date/time
    current date/time + half a day


    With regards,

    Martijn Tonies
    Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server.
    Upscene Productions
    http://www.upscene.com
    Martijn Tonies
    Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle
    Upscene Productions
    http://www.upscene.com

IMN logo majestic logo threadwatch logo seochat tools logo