Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2004
    Posts
    21

    Question Unanswered: Calculating Dates

    I have a date that is 8 position numeric and I need to perform a calculation on it to move the date up one day. The example that I need is as follows:

    Data -- 20040616
    Need to be -- 20040617

    I know that I could just add 1 to it and get the result, but I am not sure as to handle it when it is as the end of a month or year to be able to check for that secernio. Any help would be greatly appreciated!!

  2. #2
    Join Date
    Jun 2004
    Posts
    2
    I am presuming that the date is being passed in as a field and is numeric. If so - the following should work.

    Create a formula and enter the following text into the formula:

    Date (left(20040229,4),(mid(20040229,5,2)),(right(20040 229,2)))

    This will give you a date. After doing this you can either wrap this with a dateadd (i.e.:

    dateadd("d",1,(Date (left(20040229,4),(mid(20040229,5,2)),(right(20040 229,2))))

    or you can create a new formula which you would use the dateadd function on the newly created formula.

    Let me know if this fits your needs.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •