DateDiff Help Needed

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • maze03079
    New Member
    • Jul 2007
    • 4

    DateDiff Help Needed

    Hey Gang ... I'm sure this question has been asked and answered numerous times (although I'll be damned if I've been able to find it). I've read some of the other posts on this site, but none of them seemed to mimick my requirement.

    Like several other people, I was working in excel and entered a formula that would calculate the difference between entered dates. When I converted this file over to a Table in MS-Access it didn't like that formula.

    I then happened across the DateDiff function and it seemed to worked very well. However I was only able to get it to work on an MS-Access Page. Not really a big problem because I thought it should be relatively easy to transfer this data back to my Table.

    So far I haven't been able to come across a way of doing this.

    Is this possible and relatively painless ?

    Thanks for your help.
  • Stang02GT
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    Originally posted by maze03079
    Hey Gang ... I'm sure this question has been asked and answered numerous times (although I'll be damned if I've been able to find it). I've read some of the other posts on this site, but none of them seemed to mimick my requirement.

    Like several other people, I was working in excel and entered a formula that would calculate the difference between entered dates. When I converted this file over to a Table in MS-Access it didn't like that formula.

    I then happened across the DateDiff function and it seemed to worked very well. However I was only able to get it to work on an MS-Access Page. Not really a big problem because I thought it should be relatively easy to transfer this data back to my Table.

    So far I haven't been able to come across a way of doing this.

    Is this possible and relatively painless ?

    Thanks for your help.
    are you importing your excel sheets as tables in access?

    Comment

    • maze03079
      New Member
      • Jul 2007
      • 4

      #3
      Originally posted by Stang02GT
      are you importing your excel sheets as tables in access?
      I'm asked if I want to store my data into a New Table or into an Existing Table.

      If there are other options available ... I don't see them.

      Comment

      • Stang02GT
        Recognized Expert Top Contributor
        • Jun 2007
        • 1206

        #4
        Originally posted by maze03079
        I'm asked if I want to store my data into a New Table or into an Existing Table.

        If there are other options available ... I don't see them.
        Import them and create a new table.

        Comment

        • maze03079
          New Member
          • Jul 2007
          • 4

          #5
          Originally posted by Stang02GT
          Import them and create a new table.

          That's where Access tells me it doesn't like my excel formulas because after everything is said and done, the cells that 'had' the formulas in them are now just the answers of the equation.

          For example I have in my cells the following formula to calculate the number of days between a 'start' and 'stop' date:
          =IF(A13>0,(INT( A13-A12)+1+(MOD((A1 3-A12),1)>0.25)*1 +(-1)),"")

          A12 = 06/29/07
          A13 = 07/10/07

          After importing this into Access it's simply the answer to the equation which is 11

          But whereas I want to transition this database from excel to access I'd like access to calculate this for me within the table. Or if I have to calculate this on a Page then is it possible to report this number back to the table ?

          Comment

          Working...