Date & Time ASP VB

Discussion in 'ASP / ASP.net' started by sladmin, May 15, 2008.

  1. sladmin CSNM Reseller

    Hi,

    I want to put the time into a hidden field to use for my helpdesk. However I can't seem to find a proper time variable that will display the time how I want it. I want to display the time like this: 1:30 PM. I've tried loads of website and scripts but they either don't work or they display without the 'PM' bit :blink:

    Here's the code:

    Code:
    <% response.write(FormatDateTime(now(),vblongtime))%>
    Any ideas??

    Thanks in advance :smilie:
  2. siphilp CSNM Customer

    can't recall a function that would put a pm on to a date/time. :glare:

    You could always convert it to 24 hour if it's =>13 them Pm else AM? Just display the normal time?

    Haven't touched ASP for years. Am sure Mark will know?
  3. Mark Voss CSNM Customer

    Simon's right - there isn't a function that'll do this for you - you'll have to write your own!

    There's a good tutorial you can get the necessary code from here

Share This Page