Added: 3 years ago
From: Firchild
Views: 31,155
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (44)

Sign In or Sign Up now to post a comment!
  • Thank you worked fine for me =)

  • Thanks for the DateDiff tip. Do you know how to calculate age using DOB and specific date instead of now? thanks.

  • Fair play. I love you. Your accent reminds me of my home town Swansea

  • Beautiful! Just Beautiful!!!! Thank you for posting.

  • Appreciate this mate, I prefer to watch a YT vid of how to do something as opposed to reading a written tutorial :)

  • nice

    thank you

  • Thank you ^^

  • okay this may sound like an odd question but is there a way to do this for days instead of years?

  • how do i do this in Access 2010????????????

  • @Targus19 Exactly as it is here.

  • @Targus19 I dind't worked out for me in Access 2010, so i used semicolons(;) instead of commas(,). No idea why, but it worked for me!

  • @Targus19 2010 does the same things a the prior Office programs but has more abilities. So if it can be done here it can be done there the same way.

  • OMG YOU JUST SAVED MY LIFE!!! lol

  • Also, I was wondering if there is a way to calculate the difference between two fields that have dates? What is the formula for that? Thank you!!!

  • @tmkm130 replace now() with [the field name] and it should work

  • Hi, I wanted to say that I love this function. It's great. However, I have done this and for some reason, it's calculating incorrectly??? It is behind by two months. I checked my time/date setting on the lower left hand side of the computer and it is correct. Is there another area that I need to adjust this so it is correct?

  • @tmkm130 Hmmm. that's a funny one. Normally that would be a system clock issue. So I'm a bit at a loss there, sorry!

  • @Firchild i figured out why...its simply because the function finds the difference in years and disregards the months. one month ago, so im prob a bit late.

  • @tmkm130 I had a similar issue with the year being off by one. I found this DateDiff("yyyy",[DOB],Now())+I­nt(Format(Now(),"mmdd")<Format­([DOB],"mmdd")) and it works for me. Firchild is still the pro though I just got lucky.

  • However, doesn't work in czech short date format: dd.mm.yyyy

    Still returns error like Invalid syntax.

  • @kartovo Dunno, I'm not Czech

  • Thanks, this was most helpful.

  • Thanks for that =)

  • great, thx for the help!!!!

  • Thank you so much!!!

  • apart from calculating age what can date diff be used for ?

  • You just saved my life...THANKS A TONNNNNNN

  • thankyou your a life saver!

  • do you not have a problem with the datediff function in that it is slightly incorrect. for example the number of years difference between 30-dec-2009 and 1-jan-2010 is 1??? i normally have to write a vba code to fix this.

  • You could try DateDiff("yyyy", [Birthdate], Now())+ Int( Format(now(), "mmdd") < Format( [Birthdate], "mmdd") ) AS Age to work around that issue

  • WOW!!!!!! ^__^

  • you are GOD!!!!!

  • Thanks a lot, very helpful.

  • you are a legend mate this helped with an assignment

  • Thank you.

  • great help. Cheers

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more