PC Review


Reply
Thread Tools Rate Thread

Dayshift/Nightshift field based on time of day

 
 
New Member
Join Date: Mar 2011
Posts: 1
 
      25th Mar 2011
Greetings All,

I have been trying to create a field 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.

ak
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
populate time field based on field John Powell Microsoft Access 8 12th Apr 2010 09:49 PM
Display Time based on another field value Shaun Microsoft Access 2 13th Dec 2009 06:32 PM
Increase date field by 1 day based on current time? JoAnn Microsoft Excel Programming 1 30th Sep 2008 06:25 PM
Calculate time based on an integer in another field =?Utf-8?B?QXJub2xkIFI=?= Microsoft Access Getting Started 4 17th May 2005 04:53 AM
DIW record filtering (based on date/time field) Thanasis \(sch\) Microsoft Frontpage 1 14th Jan 2005 06:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:57 AM.