A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Count days overdue formula help



 
 
Thread Tools Display Modes
  #1  
Old November 16th, 2007, 07:41 AM posted to microsoft.public.access.gettingstarted
chad
external usenet poster
 
Posts: 631
Default Count days overdue formula help

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..
--
Newbies need extra loven.........
  #2  
Old November 16th, 2007, 10:01 AM posted to microsoft.public.access.gettingstarted
Larry Daugherty
external usenet poster
 
Posts: 1,012
Default Count days overdue formula help

Look in Help for DateDiff().

HTH
--
-Larry-
--

"Chad" wrote in message
...
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..
--
Newbies need extra loven.........



  #3  
Old November 16th, 2007, 10:27 AM posted to microsoft.public.access.gettingstarted
chad
external usenet poster
 
Posts: 631
Default Count days overdue formula help

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" wrote:

Look in Help for DateDiff().

HTH
--
-Larry-
--

"Chad" wrote in message
...
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..
--
Newbies need extra loven.........




  #4  
Old November 16th, 2007, 12:01 PM posted to microsoft.public.access.gettingstarted
Douglas J. Steele
external usenet poster
 
Posts: 9,313
Default Count days overdue formula help

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


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Chad" wrote in message
...
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" wrote:

Look in Help for DateDiff().

HTH
--
-Larry-
--

"Chad" wrote in message
...
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..
--
Newbies need extra loven.........






  #5  
Old November 16th, 2007, 12:56 PM posted to microsoft.public.access.gettingstarted
chad
external usenet poster
 
Posts: 631
Default Count days overdue formula help

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


"Douglas J. Steele" wrote:

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


--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Chad" wrote in message
...
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" wrote:

Look in Help for DateDiff().

HTH
--
-Larry-
--

"Chad" wrote in message
...
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..
--
Newbies need extra loven.........






  #6  
Old October 20th, 2009, 06:20 PM posted to microsoft.public.access.gettingstarted
Michael Dean
external usenet poster
 
Posts: 2
Default Working Days

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.........


"Douglas J. Steele" wrote:

Previous Posts In This Thread:

On Friday, November 16, 2007 2:41 AM
Cha wrote:

Count days overdue formula help
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 la

On Friday, November 16, 2007 5:01 AM
Larry Daugherty wrote:

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

HTH
--
-Larry-
--

to add a
the
next to
acomplish

On Friday, November 16, 2007 5:27 AM
Cha wrote:

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 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 dat

On Friday, November 16, 2007 7:01 AM
Douglas J. Steele wrote:

=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 MVP
http://I.Am/DougSteele
(no e-mail

On Friday, November 16, 2007 7:56 AM
Cha wrote:

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


"Douglas J. Steele" wrote:

EggHeadCafe - Software Developer Portal of Choice
SQL Server 2005 Paging Performance Tip
http://www.eggheadcafe.com/tutorials...paging-pe.aspx
  #7  
Old October 20th, 2009, 07:27 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Working Days

On Tue, 20 Oct 2009 10:20:07 -0700, michael dean wrote:

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.
--

John W. Vinson [MVP]
  #8  
Old October 20th, 2009, 09:02 PM posted to microsoft.public.access.gettingstarted
Arvin Meyer [MVP][_2_]
external usenet poster
 
Posts: 2,310
Default Working Days

You might try this one:

http://www.mvps.org/access/datetime/date0006.htm
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


michael dean wrote in message
news:2009102013206michaeldean@libertyassetrecovery .com...
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.........


"Douglas J. Steele" wrote:

Previous Posts In This Thread:

On Friday, November 16, 2007 2:41 AM
Cha wrote:

Count days overdue formula help
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 la

On Friday, November 16, 2007 5:01 AM
Larry Daugherty wrote:

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

HTH
--
-Larry-
--

to add a
the
next to
acomplish

On Friday, November 16, 2007 5:27 AM
Cha wrote:

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 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 dat

On Friday, November 16, 2007 7:01 AM
Douglas J. Steele wrote:

=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 MVP
http://I.Am/DougSteele
(no e-mail

On Friday, November 16, 2007 7:56 AM
Cha wrote:

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


"Douglas J. Steele" wrote:

EggHeadCafe - Software Developer Portal of Choice
SQL Server 2005 Paging Performance Tip
http://www.eggheadcafe.com/tutorials...paging-pe.aspx



 




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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:35 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.