Time, time, time, always an issue

P

Phredd

Here’s my problem:

I have a date/time field recording the date/time when pt arrives at our
hospital.
My final output needs to include 2 new fields:
- day of week pt arrived: Sun, Mon, Tues, etc (this I can do)
- time pt arrived, renamed as: Regular (6am – 5:59 pm) and Evening (6pm - 5:
59 am) This one I have no idea!!

Any Suggestions? Thanks.
 
K

KARL DEWEY

Try this ---
Pt ARR: Format(DateAdd("h",-6,[DateARR]),"dddd"", """) &
IIf(DateAdd("h",-6,[DateARR])-Int(DateAdd("h",-6,[DateARR]))<0.5,"Regular","Evening")
 
M

Marshall Barton

Phredd said:
I have a date/time field recording the date/time when pt arrives at our
hospital.
My final output needs to include 2 new fields:
- day of week pt arrived: Sun, Mon, Tues, etc (this I can do)
- time pt arrived, renamed as: Regular (6am – 5:59 pm) and Evening (6pm - 5:
59 am)

Or,
, , , & IIf(DatePart("h", DateARR) Between 6 And 17, "
Regular", " Evening"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top