Count days overdue formula help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello I have a text box "txtPeriodTo" that has a date in it. I want to add a
text box or label next to it that wiil count the days starting from the
txtPeriodTo to the current day and show it in my label or text box next to
it. I dont need to save this data. What would the formula be to acomplish
this? Thanks..
 
I want to add a text box next to it and have it appear when its past the
date and count the days that has gone past. I put this code in the text box's
control source next to the one that shows the date but it shows a negative
number if before the date shown but works if it has gone past the date. What
do I need to add to the code to make this work to where it wont be visable
unless it goes past the date?

=Format(DateDiff("d",[txtPeriodEndDate],Date()),0) & " Days Past Due"
 
=IIf(DateDiff("d",[txtPeriodEndDate],Date()) > 0,
Format(DateDiff("d",[txtPeriodEndDate],Date()),"0") & " Days Past Due",
Null)


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Chad said:
I want to add a text box next to it and have it appear when its past the
date and count the days that has gone past. I put this code in the text
box's
control source next to the one that shows the date but it shows a negative
number if before the date shown but works if it has gone past the date.
What
do I need to add to the code to make this work to where it wont be visable
unless it goes past the date?

=Format(DateDiff("d",[txtPeriodEndDate],Date()),0) & " Days Past Due"
--
Newbies need extra loven.........


Larry Daugherty said:
Look in Help for DateDiff().

HTH
 
Thanks douglas worked like a charm!
--
Newbies need extra loven.........


Douglas J. Steele said:
=IIf(DateDiff("d",[txtPeriodEndDate],Date()) > 0,
Format(DateDiff("d",[txtPeriodEndDate],Date()),"0") & " Days Past Due",
Null)


--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Chad said:
I want to add a text box next to it and have it appear when its past the
date and count the days that has gone past. I put this code in the text
box's
control source next to the one that shows the date but it shows a negative
number if before the date shown but works if it has gone past the date.
What
do I need to add to the code to make this work to where it wont be visable
unless it goes past the date?

=Format(DateDiff("d",[txtPeriodEndDate],Date()),0) & " Days Past Due"
--
Newbies need extra loven.........


Larry Daugherty said:
Look in Help for DateDiff().

HTH
--
-Larry-
--

Hello I have a text box "txtPeriodTo" that has a date in it. I want
to add a
text box or label next to it that wiil count the days starting from
the
txtPeriodTo to the current day and show it in my label or text box
next to
it. I dont need to save this data. What would the formula be to
acomplish
this? Thanks..
 
Is there a way to only count working days using DateDiff



Cha wrote:

Thanks douglas worked like a charm!
16-Nov-07

Thanks douglas worked like a charm
-
Newbies need extra loven........

:

Previous Posts In This Thread:

Count days overdue formula help
Hello I have a text box "txtPeriodTo" that has a date in it. I want to add
text box or label next to it that wiil count the days starting from th
txtPeriodTo to the current day and show it in my la

Re: Count days overdue formula help
Look in Help for DateDiff()

HT
-
-Larry
-

to add
th
next t
acomplish

I want to add a text box next to it and have it appear when its past the date
I want to add a text box next to it and have it appear when its past th
date and count the days that has gone past. I put this code in the text box'
control source next to the one that shows the dat

=IIf(DateDiff("d",[txtPeriodEndDate],Date()) > 0,
=IIf(DateDiff("d",[txtPeriodEndDate],Date()) > 0
Format(DateDiff("d",[txtPeriodEndDate],Date()),"0") & " Days Past Due"
Null

-
Doug Steele, Microsoft Access MV
http://I.Am/DougSteel
(no e-mail

Thanks douglas worked like a charm!
Thanks douglas worked like a charm
-
Newbies need extra loven........

:

EggHeadCafe - Software Developer Portal of Choice
SQL Server 2005 Paging Performance Tip
http://www.eggheadcafe.com/tutorial...8-b6ea5c39aa73/sql-server-2005-paging-pe.aspx
 
Is there a way to only count working days using DateDiff

Not directly, because when Microsoft programmed the code for DateDiff, they
did not know which days *you* consider "working days". Those might be
different for different companies!

You can come up with a customized version for your particular needs, though.
See the sample code at
http://www.mvps.org/access/datetime/date0012.htm

You may also want to do a Bing or Google search for "workday math" - it's a
very common problem with many published solutions.
 
Back
Top