Reply
 
Thread Tools Display Modes
  #1   Report Post  
JDP@Work
 
Posts: n/a
Default Add 30 days to Date

I need to add 30 or 45 days to the current date.
I've followed a few links, that for example add 301 days to a date I get the
wrong date but it's not so noticable, it's off by a month or so, and if I add 30
days I get exactly 90 days out!

Trying different inputs I get similar wrong dates.

So, please test any link you send.

TIA

JeffP.....


  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

Either run a macro when you have the cursor in the location where you want
the date to appear that contains the folloinwg code

Selection.InsertBefore Format(DateAdd("d", 30, Date), "MMMM d, yyyy")

or see http://www.wopr.com/cgi-bin/w3t/show...?Number=249902

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"JDP@Work" wrote in message
...
I need to add 30 or 45 days to the current date.
I've followed a few links, that for example add 301 days to a date I get
the
wrong date but it's not so noticable, it's off by a month or so, and if I
add 30
days I get exactly 90 days out!

Trying different inputs I get similar wrong dates.

So, please test any link you send.

TIA

JeffP.....




  #3   Report Post  
JDP@Work
 
Posts: n/a
Default

I'm so sorry, I forgot to mention that I use my documents as templates for an
automated process.

The print function I use is similar to a right-click print in the file manager
Windows Explorer.

So, macros that depend on humans won't work.

I've got some what of a solution.

Originally I was asked to use the request date, however there are often delays
in processing a request that is no fault of the client's, so I instead use the
first printing date, then the first follow up and finally the the final follow
up dates detecting only a true condition for each adding 15 days to the second
request letter that is sent out 15 days after the first letter. But as noted
some cases the second letter could have a delay and it will still give the
client 15 days.

Please complete the application by {if{appreqfu1)' ' {ddeauto appreqdt+30}\@
"MMMM d, yyyy"}{if{appreqfu1)' ' {ddeauto appreqfu1+15}\@ "MMMM d, yyyy"}

Thanks to all....

JeffP.....

"Doug Robbins" wrote in message
...
Either run a macro when you have the cursor in the location where you want
the date to appear that contains the folloinwg code

Selection.InsertBefore Format(DateAdd("d", 30, Date), "MMMM d, yyyy")

or see http://www.wopr.com/cgi-bin/w3t/show...?Number=249902

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"JDP@Work" wrote in message
...
I need to add 30 or 45 days to the current date.
I've followed a few links, that for example add 301 days to a date I get
the
wrong date but it's not so noticable, it's off by a month or so, and if I
add 30
days I get exactly 90 days out!

Trying different inputs I get similar wrong dates.

So, please test any link you send.

TIA

JeffP.....






  #4   Report Post  
Peter Jamieson
 
Posts: n/a
Default

If you are still monitoring this thread, I would be interested to know
exactly what the text in your ddeauto field is, and what kind of thing
"appreqt" is.

Thanks,

Peter Jamieson

"JDP@Work" wrote in message
...
I'm so sorry, I forgot to mention that I use my documents as templates for
an
automated process.

The print function I use is similar to a right-click print in the file
manager
Windows Explorer.

So, macros that depend on humans won't work.

I've got some what of a solution.

Originally I was asked to use the request date, however there are often
delays
in processing a request that is no fault of the client's, so I instead use
the
first printing date, then the first follow up and finally the the final
follow
up dates detecting only a true condition for each adding 15 days to the
second
request letter that is sent out 15 days after the first letter. But as
noted
some cases the second letter could have a delay and it will still give the
client 15 days.

Please complete the application by {if{appreqfu1)' ' {ddeauto
appreqdt+30}\@
"MMMM d, yyyy"}{if{appreqfu1)' ' {ddeauto appreqfu1+15}\@ "MMMM d, yyyy"}

Thanks to all....

JeffP.....

"Doug Robbins" wrote in message
...
Either run a macro when you have the cursor in the location where you
want
the date to appear that contains the folloinwg code

Selection.InsertBefore Format(DateAdd("d", 30, Date), "MMMM d, yyyy")

or see http://www.wopr.com/cgi-bin/w3t/show...?Number=249902

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"JDP@Work" wrote in message
...
I need to add 30 or 45 days to the current date.
I've followed a few links, that for example add 301 days to a date I
get
the
wrong date but it's not so noticable, it's off by a month or so, and if
I
add 30
days I get exactly 90 days out!

Trying different inputs I get similar wrong dates.

So, please test any link you send.

TIA

JeffP.....








  #5   Report Post  
JDP@Work
 
Posts: n/a
Default

It is a date field from an MSSQL database that is passed as a dBase expression,
that when I add 30 is shows the date 30 days in advance.

excerpt snipit...
{if"{ddeauto goldmine data (contact2-uappreqfu1)}"' ' {ddeauto goldmine data
contact2-uappreqfu1+15}\@"MMM d, yyyy"}

You will notice that I have two similar fields, only one prints the date+30 or
date+15 depending on the boolean of a date in the first followup field.

I've gotten around my original problem by using my last printed dates and adding
the appropriate remaining days.

The only thing is; say a letter was printed 7 days ago, but for some reason it
was wrong and was not sent out.

I don't want my users having to find that record in the database, the QA person
just does their task to set it to reprint and later that day it does.

But it would add 30 or 15 days to the 7 days old last followup print date.

What would be best is if I could add the correct days to the print date in the
doc depending on if the last print date had a value, but not evaluate the date,
just say yes or no and add 30 or the remaiing 15 days.

TIA

JeffP.....

"Peter Jamieson" wrote in message
...
If you are still monitoring this thread, I would be interested to know
exactly what the text in your ddeauto field is, and what kind of thing
"appreqt" is.

Thanks,

Peter Jamieson

"JDP@Work" wrote in message
...
I'm so sorry, I forgot to mention that I use my documents as templates for
an
automated process.

The print function I use is similar to a right-click print in the file
manager
Windows Explorer.

So, macros that depend on humans won't work.

I've got some what of a solution.

Originally I was asked to use the request date, however there are often
delays
in processing a request that is no fault of the client's, so I instead use
the
first printing date, then the first follow up and finally the the final
follow
up dates detecting only a true condition for each adding 15 days to the
second
request letter that is sent out 15 days after the first letter. But as
noted
some cases the second letter could have a delay and it will still give the
client 15 days.

Please complete the application by {if{appreqfu1)' ' {ddeauto
appreqdt+30}\@
"MMMM d, yyyy"}{if{appreqfu1)' ' {ddeauto appreqfu1+15}\@ "MMMM d, yyyy"}

Thanks to all....

JeffP.....

"Doug Robbins" wrote in message
...
Either run a macro when you have the cursor in the location where you
want
the date to appear that contains the folloinwg code

Selection.InsertBefore Format(DateAdd("d", 30, Date), "MMMM d, yyyy")

or see http://www.wopr.com/cgi-bin/w3t/show...?Number=249902

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"JDP@Work" wrote in message
...
I need to add 30 or 45 days to the current date.
I've followed a few links, that for example add 301 days to a date I
get
the
wrong date but it's not so noticable, it's off by a month or so, and if
I
add 30
days I get exactly 90 days out!

Trying different inputs I get similar wrong dates.

So, please test any link you send.

TIA

JeffP.....












  #6   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Hi JeffP,

Thanks for the clarification re. DDEAUTO. There are a couple of other
possible approaches to this but since it seems you have found one that works
I wouln't be inclined to touch it.

Re. the business of reprinting stuff, I suspect I have not fully understood
but can only suggest that
a. once /Word/ thinks you have printed, and the document is saved, the
document is going to contain the date Word thought you had printed it on. It
doesn't know that someone threw the thing in the bin.
b. so I suspect what really needs to change is the procedure - i.e.,
someone has to start slightly further back in the process and do a
"re-merge", rather than just doing a "reprint".

Peter Jamieson

"JDP@Work" wrote in message
...
It is a date field from an MSSQL database that is passed as a dBase
expression,
that when I add 30 is shows the date 30 days in advance.

excerpt snipit...
{if"{ddeauto goldmine data (contact2-uappreqfu1)}"' ' {ddeauto goldmine
data
contact2-uappreqfu1+15}\@"MMM d, yyyy"}

You will notice that I have two similar fields, only one prints the
date+30 or
date+15 depending on the boolean of a date in the first followup field.

I've gotten around my original problem by using my last printed dates and
adding
the appropriate remaining days.

The only thing is; say a letter was printed 7 days ago, but for some
reason it
was wrong and was not sent out.

I don't want my users having to find that record in the database, the QA
person
just does their task to set it to reprint and later that day it does.

But it would add 30 or 15 days to the 7 days old last followup print date.

What would be best is if I could add the correct days to the print date in
the
doc depending on if the last print date had a value, but not evaluate the
date,
just say yes or no and add 30 or the remaiing 15 days.

TIA

JeffP.....

"Peter Jamieson" wrote in message
...
If you are still monitoring this thread, I would be interested to know
exactly what the text in your ddeauto field is, and what kind of thing
"appreqt" is.

Thanks,

Peter Jamieson

"JDP@Work" wrote in message
...
I'm so sorry, I forgot to mention that I use my documents as templates
for
an
automated process.

The print function I use is similar to a right-click print in the file
manager
Windows Explorer.

So, macros that depend on humans won't work.

I've got some what of a solution.

Originally I was asked to use the request date, however there are often
delays
in processing a request that is no fault of the client's, so I instead
use
the
first printing date, then the first follow up and finally the the final
follow
up dates detecting only a true condition for each adding 15 days to the
second
request letter that is sent out 15 days after the first letter. But as
noted
some cases the second letter could have a delay and it will still give
the
client 15 days.

Please complete the application by {if{appreqfu1)' ' {ddeauto
appreqdt+30}\@
"MMMM d, yyyy"}{if{appreqfu1)' ' {ddeauto appreqfu1+15}\@ "MMMM d,
yyyy"}

Thanks to all....

JeffP.....

"Doug Robbins" wrote in message
...
Either run a macro when you have the cursor in the location where you
want
the date to appear that contains the folloinwg code

Selection.InsertBefore Format(DateAdd("d", 30, Date), "MMMM d, yyyy")

or see http://www.wopr.com/cgi-bin/w3t/show...?Number=249902

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"JDP@Work" wrote in message
...
I need to add 30 or 45 days to the current date.
I've followed a few links, that for example add 301 days to a date I
get
the
wrong date but it's not so noticable, it's off by a month or so, and
if
I
add 30
days I get exactly 90 days out!

Trying different inputs I get similar wrong dates.

So, please test any link you send.

TIA

JeffP.....












Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculate a date from days date KS Microsoft Word Help 2 May 10th 05 12:50 PM
add days to the current date. D. Sawicki Microsoft Word Help 1 April 14th 05 12:53 AM
How do I insert a current date in a template and then keep this i. Chrissy Microsoft Word Help 5 March 17th 05 01:42 AM
How to insert future date based on current date plus 14 days John Bakker Microsoft Word Help 1 January 31st 05 10:08 PM
In Word, any way to add 120 days to a merged date? UsedBits Mailmerge 8 December 17th 04 09:35 PM


All times are GMT +1. The time now is 12:34 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"