Results 1 to 3 of 3

Thread: Converting Time

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Location
    belgium
    Posts
    74

    Thumbs up

    Is there an easy way to convert a string which contains a time in 24h format to AM/PM format.

    Note: I don't want to work with any type which is depending on the regional settings.

    Thanks

  2. #2
    Lively Member
    Join Date
    Oct 2000
    Location
    Scotland
    Posts
    96

    Try this....

    Try

    format(datevariable, "Medium Time")

    this should display your time in the 12 hour format with AM/PM indicator


    H.
    Just trying to muddle through...

  3. #3
    Fanatic Member Stevie's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    565
    Try this ...

    Code:
    strTime = Format(strTime, "hh:mm:ss am/pm")
    VB6 sp5, SQL Server 2000, C#

    There are no stupid questions. Only stupid people.

Posting Permissions

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



Click Here to Expand Forum to Full Width