View Single Post
 
Old 11-05-2025, 04:17 AM
MishkaGrizzly MishkaGrizzly is offline Windows 11 Office 2021
Novice
 
Join Date: Nov 2025
Posts: 4
MishkaGrizzly is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
You could use a field construction like:
{=INT({MERGEFIELD Minutes}/60) \# "0' hr '"}{=MOD({MERGEFIELD Minutes},60) \# "0' min'"}
or
{=INT(«Minutes»/60) \# "0' hr '"}{=MOD(«Minutes»,60) \# "0' min'"}
where 'Minutes' is your datafield name.

NOTE: The field brace pairs (i.e. '{ }') for the above field code examples are created in the mailmerge main document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from here. Nor is it practicable (for the most part) to add them via the standard Word dialogues. Likewise, the chevrons (i.e. '« »') - are part of the actual mergefields, inserted via the 'Insert Merge Field' dropdown (i.e. you can't type them or copy & paste them from here). The spaces shown in the field constructions are all required.
Thank you for your reply.

I have tried this but the output I get is something like that

0 hr 30 min

I am trying to remove the 0 hr or 0 min if there is any, so the end result will be just

30 min
or
2 hr
or
1 hr 15 min

Thanks,
Reply With Quote