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 Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Calculating Dates



 
 
Thread Tools Display Modes
  #1  
Old January 16th, 2007, 01:38 PM posted to microsoft.public.word.mailmerge.fields
Karin
external usenet poster
 
Posts: 272
Default Calculating Dates

After a lot of searching of this forum, the knowledge base, and the help
files, I can't help but wonder

Why can't Word handle dates?

Why can't I ask a user for different date information and do calculations on
the input?
  #2  
Old January 16th, 2007, 02:41 PM posted to microsoft.public.word.mailmerge.fields
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Calculating Dates

The short answer is that you can do this - if
http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 doesn't give you any
ideas, tell us what you are trying to do.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Karin wrote:
After a lot of searching of this forum, the knowledge base, and the
help files, I can't help but wonder

Why can't Word handle dates?

Why can't I ask a user for different date information and do
calculations on the input?



  #3  
Old January 16th, 2007, 02:46 PM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Calculating Dates

You would really have to ask Microsoft that question (the regular responders
in here are not MS employees).

The probable reason is that Microsoft sees no good commercial reason to
improve things in this area when demand for other facilities has
(presumably) been much stronger. There is no technical reason why Word could
not handle date entry and date calculations a lot better than it does. Of
course, there are non-trivial problems such as the impossibility of telling
what format a date is in - e.g. is 5/6/2007 6th May (cf. in the US) or 5th
June (cf. in the UK), and the difficulty of dealing with multilingual date
entry, but those problems can be dealt with in one way or another.

Peter Jamieson

"Karin" wrote in message
...
After a lot of searching of this forum, the knowledge base, and the help
files, I can't help but wonder

Why can't Word handle dates?

Why can't I ask a user for different date information and do calculations
on
the input?



  #4  
Old January 16th, 2007, 02:59 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Calculating Dates

It can with a little bit of VBA using the DateAdd(), DateDiff() functions
for example.

Or if you are a field masochist/afficionado like fellow MVP Macropod, you
can do it as shown at:

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

"Karin" wrote in message
...
After a lot of searching of this forum, the knowledge base, and the help
files, I can't help but wonder

Why can't Word handle dates?

Why can't I ask a user for different date information and do calculations
on
the input?



  #5  
Old January 16th, 2007, 06:55 PM posted to microsoft.public.word.mailmerge.fields
Karin
external usenet poster
 
Posts: 272
Default Calculating Dates

Graham,

I have two ask fields (LetterDate and YearEndDate). I want to change text
based on the dates:

If LetterDate is = YearEndDate "ending" "ended"

I can have the information entered in the ask fields in any format, but it
needs to be displayed as mmmm dd, yyyy (January 16, 2007) in the letter.

I'm not much of a programmer, but it doesn't seem like this should be so
difficult.

"Graham Mayor" wrote:

The short answer is that you can do this - if
http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 doesn't give you any
ideas, tell us what you are trying to do.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Karin wrote:
After a lot of searching of this forum, the knowledge base, and the
help files, I can't help but wonder

Why can't Word handle dates?

Why can't I ask a user for different date information and do
calculations on the input?




  #6  
Old January 16th, 2007, 07:06 PM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Calculating Dates

This was my reply to your message in another group - a good example IMO of
why it's not a good idea to post the same question separately to different
groups (in short: why do you imagine that your time is more valuable than
ours?):

The comparisons are text comparisons rather than date comparisons. To do a
date comparison you need the dates in YYYYMMDD format, so e.g.

{ IF { REF LetterDate \@YYYYMMDD } = { REF YearEndDate \@YYYYMMDD }
"ending" "ended" }

is more likely to do the trick. But of course it will only work if Word
recognises the texts as dates and converts them correctly.


Peter Jamieson



"Karin" wrote in message
...
Graham,

I have two ask fields (LetterDate and YearEndDate). I want to change text
based on the dates:

If LetterDate is = YearEndDate "ending" "ended"

I can have the information entered in the ask fields in any format, but it
needs to be displayed as mmmm dd, yyyy (January 16, 2007) in the letter.

I'm not much of a programmer, but it doesn't seem like this should be so
difficult.

"Graham Mayor" wrote:

The short answer is that you can do this - if
http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 doesn't give you
any
ideas, tell us what you are trying to do.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Karin wrote:
After a lot of searching of this forum, the knowledge base, and the
help files, I can't help but wonder

Why can't Word handle dates?

Why can't I ask a user for different date information and do
calculations on the input?






  #7  
Old January 17th, 2007, 06:28 PM posted to microsoft.public.word.mailmerge.fields
Karin
external usenet poster
 
Posts: 272
Default Calculating Dates

Peter,

I didn't start out asking the same question. The original question is why
can't word handle dates? I replied to Graham's question of what I wanted to
do.

I still want to know why Word doesn't have a date field that can be filled
in by a user and calculated. I'm clearly not the only one on this forum
wanting to manipulate date information.

Don't assign words or thoughts to me that aren't there. I don't imagine
you're more important than me!

"Peter Jamieson" wrote:

This was my reply to your message in another group - a good example IMO of
why it's not a good idea to post the same question separately to different
groups (in short: why do you imagine that your time is more valuable than
ours?):

The comparisons are text comparisons rather than date comparisons. To do a
date comparison you need the dates in YYYYMMDD format, so e.g.

{ IF { REF LetterDate \@YYYYMMDD } = { REF YearEndDate \@YYYYMMDD }
"ending" "ended" }

is more likely to do the trick. But of course it will only work if Word
recognises the texts as dates and converts them correctly.


Peter Jamieson



"Karin" wrote in message
...
Graham,

I have two ask fields (LetterDate and YearEndDate). I want to change text
based on the dates:

If LetterDate is = YearEndDate "ending" "ended"

I can have the information entered in the ask fields in any format, but it
needs to be displayed as mmmm dd, yyyy (January 16, 2007) in the letter.

I'm not much of a programmer, but it doesn't seem like this should be so
difficult.

"Graham Mayor" wrote:

The short answer is that you can do this - if
http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 doesn't give you
any
ideas, tell us what you are trying to do.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Karin wrote:
After a lot of searching of this forum, the knowledge base, and the
help files, I can't help but wonder

Why can't Word handle dates?

Why can't I ask a user for different date information and do
calculations on the input?






  #8  
Old January 17th, 2007, 07:03 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Calculating Dates

Word is a word processor. If you want to do calculations use a spreadsheet.

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

"Karin" wrote in message
...
Peter,

I didn't start out asking the same question. The original question is why
can't word handle dates? I replied to Graham's question of what I wanted
to
do.

I still want to know why Word doesn't have a date field that can be filled
in by a user and calculated. I'm clearly not the only one on this forum
wanting to manipulate date information.

Don't assign words or thoughts to me that aren't there. I don't imagine
you're more important than me!

"Peter Jamieson" wrote:

This was my reply to your message in another group - a good example IMO
of
why it's not a good idea to post the same question separately to
different
groups (in short: why do you imagine that your time is more valuable than
ours?):

The comparisons are text comparisons rather than date comparisons. To do
a
date comparison you need the dates in YYYYMMDD format, so e.g.

{ IF { REF LetterDate \@YYYYMMDD } = { REF YearEndDate \@YYYYMMDD }
"ending" "ended" }

is more likely to do the trick. But of course it will only work if Word
recognises the texts as dates and converts them correctly.


Peter Jamieson



"Karin" wrote in message
...
Graham,

I have two ask fields (LetterDate and YearEndDate). I want to change
text
based on the dates:

If LetterDate is = YearEndDate "ending" "ended"

I can have the information entered in the ask fields in any format, but
it
needs to be displayed as mmmm dd, yyyy (January 16, 2007) in the
letter.

I'm not much of a programmer, but it doesn't seem like this should be
so
difficult.

"Graham Mayor" wrote:

The short answer is that you can do this - if
http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 doesn't give
you
any
ideas, tell us what you are trying to do.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Karin wrote:
After a lot of searching of this forum, the knowledge base, and the
help files, I can't help but wonder

Why can't Word handle dates?

Why can't I ask a user for different date information and do
calculations on the input?








  #9  
Old January 17th, 2007, 07:45 PM posted to microsoft.public.word.mailmerge.fields
Karin
external usenet poster
 
Posts: 272
Default Calculating Dates

Not helpful Doug. It's a simple If statement based on two dates in a form
letter. It is in no way a spreadsheet operation.

"Doug Robbins - Word MVP" wrote:

Word is a word processor. If you want to do calculations use a spreadsheet.

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

"Karin" wrote in message
...
Peter,

I didn't start out asking the same question. The original question is why
can't word handle dates? I replied to Graham's question of what I wanted
to
do.

I still want to know why Word doesn't have a date field that can be filled
in by a user and calculated. I'm clearly not the only one on this forum
wanting to manipulate date information.

Don't assign words or thoughts to me that aren't there. I don't imagine
you're more important than me!

"Peter Jamieson" wrote:

This was my reply to your message in another group - a good example IMO
of
why it's not a good idea to post the same question separately to
different
groups (in short: why do you imagine that your time is more valuable than
ours?):

The comparisons are text comparisons rather than date comparisons. To do
a
date comparison you need the dates in YYYYMMDD format, so e.g.

{ IF { REF LetterDate \@YYYYMMDD } = { REF YearEndDate \@YYYYMMDD }
"ending" "ended" }

is more likely to do the trick. But of course it will only work if Word
recognises the texts as dates and converts them correctly.


Peter Jamieson



"Karin" wrote in message
...
Graham,

I have two ask fields (LetterDate and YearEndDate). I want to change
text
based on the dates:

If LetterDate is = YearEndDate "ending" "ended"

I can have the information entered in the ask fields in any format, but
it
needs to be displayed as mmmm dd, yyyy (January 16, 2007) in the
letter.

I'm not much of a programmer, but it doesn't seem like this should be
so
difficult.

"Graham Mayor" wrote:

The short answer is that you can do this - if
http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 doesn't give
you
any
ideas, tell us what you are trying to do.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Karin wrote:
After a lot of searching of this forum, the knowledge base, and the
help files, I can't help but wonder

Why can't Word handle dates?

Why can't I ask a user for different date information and do
calculations on the input?









  #10  
Old January 17th, 2007, 07:50 PM posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
external usenet poster
 
Posts: 4,550
Default Calculating Dates

I don't imagine
you're more important than me!


Glad to hear it, and apologies if I misunderstood.

However, the reality is still as I said before - there is no technical
reason why Word couldn't do it, but Microsoft has chosen not to provide
thsoe facilities in the "field language," and only they know for sure why.
Any of us can certainly speculate, and I would do so for fun, but since it
doesn't actually result in any useful change it seems a bit of a waste of
time :-)

Peter Jamieson

"Karin" wrote in message
...
Peter,

I didn't start out asking the same question. The original question is why
can't word handle dates? I replied to Graham's question of what I wanted
to
do.

I still want to know why Word doesn't have a date field that can be filled
in by a user and calculated. I'm clearly not the only one on this forum
wanting to manipulate date information.

Don't assign words or thoughts to me that aren't there. I don't imagine
you're more important than me!

"Peter Jamieson" wrote:

This was my reply to your message in another group - a good example IMO
of
why it's not a good idea to post the same question separately to
different
groups (in short: why do you imagine that your time is more valuable than
ours?):

The comparisons are text comparisons rather than date comparisons. To do
a
date comparison you need the dates in YYYYMMDD format, so e.g.

{ IF { REF LetterDate \@YYYYMMDD } = { REF YearEndDate \@YYYYMMDD }
"ending" "ended" }

is more likely to do the trick. But of course it will only work if Word
recognises the texts as dates and converts them correctly.


Peter Jamieson



"Karin" wrote in message
...
Graham,

I have two ask fields (LetterDate and YearEndDate). I want to change
text
based on the dates:

If LetterDate is = YearEndDate "ending" "ended"

I can have the information entered in the ask fields in any format, but
it
needs to be displayed as mmmm dd, yyyy (January 16, 2007) in the
letter.

I'm not much of a programmer, but it doesn't seem like this should be
so
difficult.

"Graham Mayor" wrote:

The short answer is that you can do this - if
http://www.wopr.com/cgi-bin/w3t/show...?Number=249902 doesn't give
you
any
ideas, tell us what you are trying to do.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


Karin wrote:
After a lot of searching of this forum, the knowledge base, and the
help files, I can't help but wonder

Why can't Word handle dates?

Why can't I ask a user for different date information and do
calculations on the input?








 




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 11:52 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.