For the dayname why not use data formatting via the inspector's data tab to show the name of the day of the week?
And formatting options in the same place can format time to be in 12 hour (am/pm) format.
If you truly need the calculation:
If ( TimeField > 43200 ; "PM" ; "AM" ) // there are 43200 seconds from Midnight the day before to 12 noon.
Perfect. Thanks. The inspector data type works great on the form but does not work when I try to wrap html in my calculated field. You answered similar question last Friday for same reason. Thanks again!