Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-26-2011, 12:15 PM
akraw akraw is offline field value based on time of day Windows XP field value based on time of day Office 2007
Novice
field value based on time of day
 
Join Date: Mar 2011
Posts: 2
akraw is on a distinguished road
Default field value based on time of day

Greetings All,



I have been trying to create a field in Word 2007 that will display "DAYSHIFT" before noon and "NIGHTSHIFT" after. This is rather difficult, since I can't find anywhere an explanation of how Word parses date/time values. To get around that, I have tried the two following field codes:

{If Time \@"HH" < 12 "Dayshift" "Nightshift"}
{If Time \@"am/pm" = am "Dayshift" "Nightshift"}

Both of these yield the result "NIGHTSHIFT" now, and also when I switch the system time to AM.

Can someone please tell me what I'm doing wrong?

thanks.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
field value based on time of day Add a period of time to a referenced "Time" cell? derelyth Excel 4 03-27-2011 04:31 PM
Look up an array based on user input johnsmb Excel 2 01-07-2011 01:12 PM
server based rules Babs27 Outlook 1 01-01-2011 07:21 PM
field value based on time of day Selecting merge field based on whether or not text is present amym Mail Merge 1 12-07-2010 05:14 AM
How to refer a field in another field DaveSmith Word 0 08-24-2010 06:44 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft