AM/PM what date part?

Results 1 to 2 of 2

Thread: AM/PM what date part?

  1. #1
    Join Date
    Dec 1969

    Default AM/PM what date part?

    This is a rather strange question so bear with me here.<BR><BR>I have a date/time in a db that I pull out called starttime. I need to pull it apart. So to get the various parts I do this.<BR><BR>ttime = TimeValue(starttime) Pulls the time out<BR>htime = hour(ttime) Pulls the hour out<BR>mtime = minute(ttime) Pulls the minute out<BR><BR>?time = ?(ttime) Pulls the AM or PM out?<BR><BR>Anyone know I can&#039;t find it in the docs at msdn? Thanks<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: AM/PM what date part?

    &nbsp;<BR>if (CDBL(htime) &#062; 12) then ?time=pm else am<BR><BR>couldn&#039;t you use a vbscript format function and then cut it off the end as well?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts