Skip to main content
September 12, 2008
Question

Too weird to give a title to

  • September 12, 2008
  • 1 reply
  • 209 views
I want to take the variable tmCurrent and if it has a for am in it I want to add 12 to the number so if its 8:00 am I want the new time to be 20:00 am and then I strip out the am part to just be left with 20:00 however I just get 12 replacing the first 2 numbers in my time
    This topic has been closed for replies.

    1 reply

    Inspiring
    September 12, 2008
    Something wrong with?

    <cfoutput>
    #dateFormat(now(),'yyyy/mm/dd')#
    #timeFormat(now(),'HH:mm')#
    </cfoutput>

    I'll leave it to you to put this back into your input tag.

    P.S. A quick read of the timeFormat() function would show that upper
    case 'HH' returns 24 hour formated time.