View Single Post
 
Old 04-27-2017, 08:12 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Try:

{IF{MERGEFIELD r1_srl}= "" "" "{SET A {IF{MERGEFIELD r1_srl \@ "AM/PM"}= "AM" "A" "P"}}{SET B {IF{MERGEFIELD r1_sru \@ "AM/PM"}= "AM" "A" "P"}}{MERGEFIELD r1_srl \@ "h:mm"}{IF{REF A}={REF B} "" {REF A}}-{MERGEFIELD r1_sru \@ "h:mm"}{REF B}"}

Note: The '{IF{REF A}={REF B} "" {REF A}}' construction suppresses the first A/P if both times are AM or PM. If you don't want to do that, simply replace that part of the field code with '{REF A}'.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote