date

D

darringates

i am trying to take a date in a date field and add the next month then get the difference in days, please help
 
E

Elwin

Dim dte as Date
Dim intDays as Integer
dte = #1/1/2004#
intDays = DateDiff("d",dte,DateAdd("m",1,dte))
-----Original Message-----
i am trying to take a date in a date field and add the
next month then get the difference in days, please help
 
T

Tim Ferguson

i am trying to take a date in a date field and add the next month then
get the difference in days, please help

It's the same as the number of days in the current month, so:

Day(DateSerial(Year(MyDate), Month(MyDate)+1,0)


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top