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  

Mail Marge Time formats



 
 
Thread Tools Display Modes
  #1  
Old August 5th, 2009, 12:04 PM posted to microsoft.public.word.mailmerge.fields
pigsy101
external usenet poster
 
Posts: 10
Default Mail Marge Time formats

Hi All.

I have mergefield which contains the total duration of a number of
interactions which is stored as a decimal value

e.g. 21.75

this is 21.75 hours and i need a way to convert this to 21 hours and
45 minutes.

I can convert this to minutes (*60) to get 1305 minutes but still
canno work out how to get this to hours and minutes.

Any help is very gratefully accepted.

Thanks

  #2  
Old August 5th, 2009, 12:48 PM posted to microsoft.public.word.mailmerge.fields
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Mail Marge Time formats

You could use the following formulae

{= INT({ Mergefield MyTime })\# 0}hours and { =({ =MOD({ Mergefield
MyTime }, {= INT({ Mergefield MyTime })})} *60) \# 0 } minutes

All curly brackets are inserted with CTRL+F9.

--

Graham Mayor - Word MVP

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



pigsy101 wrote:
Hi All.

I have mergefield which contains the total duration of a number of
interactions which is stored as a decimal value

e.g. 21.75

this is 21.75 hours and i need a way to convert this to 21 hours and
45 minutes.

I can convert this to minutes (*60) to get 1305 minutes but still
canno work out how to get this to hours and minutes.

Any help is very gratefully accepted.

Thanks



  #3  
Old August 5th, 2009, 01:08 PM posted to microsoft.public.word.mailmerge.fields
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default Mail Marge Time formats

Hi pigsy101,

A pair offields coded as:
{=INT(«MyTime») \# 0} hours and {=MOD(«MyTime»,1)*60 \# 0} minutes
will do the job.

Note: The field brace pairs (ie '{ }') for the above example are created via Ctrl-F9 - you can't simply type them or copy & paste
them from this message. Likwise, you can't type the chevrons (ie '« »') - they're part of the actual mergefields, which you can
insert from the mailmerge toolbar.

--
Cheers
macropod
[Microsoft MVP - Word]


"pigsy101" wrote in message ...
Hi All.

I have mergefield which contains the total duration of a number of
interactions which is stored as a decimal value

e.g. 21.75

this is 21.75 hours and i need a way to convert this to 21 hours and
45 minutes.

I can convert this to minutes (*60) to get 1305 minutes but still
canno work out how to get this to hours and minutes.

Any help is very gratefully accepted.

Thanks


  #4  
Old August 5th, 2009, 01:17 PM posted to microsoft.public.word.mailmerge.fields
pigsy101
external usenet poster
 
Posts: 10
Default Mail Marge Time formats

On Aug 5, 12:48*pm, "Graham Mayor" wrote:
You could use the following formulae

{= INT({ Mergefield MyTime })\# 0}hours and { =({ =MOD({ Mergefield
MyTime }, {= INT({ Mergefield MyTime })})} *60) \# 0 } minutes

All curly brackets are inserted with CTRL+F9.

--

Graham Mayor - *Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org




pigsy101 wrote:
Hi All.


I have mergefield which contains the total duration of a number of
interactions which is stored as a decimal value


e.g. 21.75


this is 21.75 hours and i need a way to convert this to 21 hours and
45 minutes.


I can convert this to minutes (*60) to get 1305 minutes but still
canno work out how to get this to hours and minutes.


Any help is very gratefully accepted.


Thanks- Hide quoted text -


- Show quoted text -


Thank you so much,

this is perfect

Thanks for your help

  #5  
Old August 5th, 2009, 02:09 PM posted to microsoft.public.word.mailmerge.fields
pigsy101
external usenet poster
 
Posts: 10
Default Mail Marge Time formats

On Aug 5, 1:17*pm, pigsy101 wrote:
On Aug 5, 12:48*pm, "Graham Mayor" wrote:





You could use the following formulae


{= INT({ Mergefield MyTime })\# 0}hours and { =({ =MOD({ Mergefield
MyTime }, {= INT({ Mergefield MyTime })})} *60) \# 0 } minutes


All curly brackets are inserted with CTRL+F9.


--

Graham Mayor - *Word MVP


My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org


pigsy101 wrote:
Hi All.


I have mergefield which contains the total duration of a number of
interactions which is stored as a decimal value


e.g. 21.75


this is 21.75 hours and i need a way to convert this to 21 hours and
45 minutes.


I can convert this to minutes (*60) to get 1305 minutes but still
canno work out how to get this to hours and minutes.


Any help is very gratefully accepted.


Thanks- Hide quoted text -


- Show quoted text -


Thank you so much,

this is perfect

Thanks for your help- Hide quoted text -

- Show quoted text -


HI I have implemented this into the word doc but i get a syntax error
until i manually update the fields.

Is there a way around this?

pigsy101
 




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 10:14 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.