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
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