Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Calculate the period in Access

Calculate the period in Access

Scheduled Pinned Locked Moved Visual Basic
questiondatabase
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi, I have an access database which contain one table with 3 fields. The structure below is:

    tblPeriod
    
    Name    DateHired    DateRetired
    ....    .........    ...........
    ....    .........    ...........
    ....    .........    ...........
    ....    .........    ...........
    

    The ... represent the information of record that user supply the information. My question is: how could I calculate the period for each record (mean the duration that they work for the companay, simple arimathic is DateRetired - DateHired) in form. Which function should I used to calculate it? :confused:


    A thousand mile of journey, begin with the first step. APO-CEDC Save Children Norway-Cambodia Office

    G 1 Reply Last reply
    0
    • L Lost User

      Hi, I have an access database which contain one table with 3 fields. The structure below is:

      tblPeriod
      
      Name    DateHired    DateRetired
      ....    .........    ...........
      ....    .........    ...........
      ....    .........    ...........
      ....    .........    ...........
      

      The ... represent the information of record that user supply the information. My question is: how could I calculate the period for each record (mean the duration that they work for the companay, simple arimathic is DateRetired - DateHired) in form. Which function should I used to calculate it? :confused:


      A thousand mile of journey, begin with the first step. APO-CEDC Save Children Norway-Cambodia Office

      G Offline
      G Offline
      gthompson2005
      wrote on last edited by
      #2

      I'm not aware of any function that would automatically do this for you. I think i've seen you post before using vb .net. But for either vb6, vba, vb .net you would have to create your own function that would take this. I use access in my apps, so i know some programming side, Again I don't know of any thing that will automatically take care of that.

      L 1 Reply Last reply
      0
      • G gthompson2005

        I'm not aware of any function that would automatically do this for you. I think i've seen you post before using vb .net. But for either vb6, vba, vb .net you would have to create your own function that would take this. I use access in my apps, so i know some programming side, Again I don't know of any thing that will automatically take care of that.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        I have check the book Visual Basic 5 Night School by Greg Perry and found the fuction to calculate the time DateDiff(). I think this function might be useful for me to use in access but I did not try yet.


        A thousand mile of journey, begin with the first step. APO-CEDC Save Children Norway-Cambodia Office

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups