Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old August 6th, 2004, 01:52 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to calculate difference in dates

Hi!

How can i calculate the difference between 1-jul-2004 and 5-aug-2004, in VBA, in terms of number of days?

Thanks!
ashu

Reply With Quote
  #2 (permalink)  
Old August 6th, 2004, 08:41 PM
Registered User
 
Join Date: Jun 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default


if A3= 5-aug-04, and B3= 1-jul-04, then the diff in C3 is
C3= VALUE(VALUE(A3)-VALUE(B3))= 35


Reply With Quote
  #3 (permalink)  
Old August 8th, 2004, 11:01 PM
Authorized User
 
Join Date: Feb 2004
Location: , , Denmark.
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi
Look in the help and find
Datediff!
Cheers

Reply With Quote
  #4 (permalink)  
Old August 9th, 2004, 07:11 AM
Authorized User
 
Join Date: Jan 2004
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks! Datediff worked. :)

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
calculate a number between two dates in time t400 SQL Server 2000 8 September 5th, 2006 02:14 PM
Calculate a difference percentage skwilliams Classic ASP Basics 15 April 4th, 2006 07:46 AM
Urgent! how to calculate difference between dates Subuana Beginning VB 6 2 March 22nd, 2006 05:34 PM
How to Calculate dates in datagrid columns chiefouko VS.NET 2002/2003 2 July 15th, 2004 02:24 AM
calculate time between two dates RMorales2831 Access 1 February 13th, 2004 11:38 PM



All times are GMT -4. The time now is 06:01 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.