1 Replies - 3699 Views - Last Post: 24 January 2010 - 06:11 AM Rate Topic: -----

#1 Ammukutti  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 14-December 09

Difference between two date

Post icon  Posted 24 January 2010 - 06:04 AM

Hi friends,

It is the situation, there are two dates in short date format(month/date/year). I need the difference between the 2 years in the same format. What i tried is i assigned two dates in 2 variables and did - operation. but it resulted in the difference between 2 month values.

Even i have another doubt too. If i hav a date in this format month/date/year(short date) how can i separate the values of day,month,year.

Pls help.
Thanks in advance.

This post has been edited by Ammukutti: 24 January 2010 - 06:06 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Difference between two date

#2 raziel_  Icon User is offline

  • Like a lollipop
  • member icon

Reputation: 463
  • View blog
  • Posts: 4,255
  • Joined: 25-March 09

Re: Difference between two date

Posted 24 January 2010 - 06:11 AM

hello :)
use this function:
Function DateDiff(Interval As String, Date1, Date2, [FirstDayOfWeek As VbDayOfWeek = vbSunday], [FirstWeekOfYear As VbFirstWeekOfYear = vbFirstJan1])
Member of VBA.DateTime
Returns the number of time intervals between two specified dates

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1