UName10
asked on
Time function needs to be 24 hour format
My page here uses the following code to pull out the start and end times from the database for each event.
It's stored in the database fine in 24 hour time format, but I'm currently just getting the first integer for the hour and minute (e.g. '19 0' instead of '19:00').
Here's the part that handles the time:
Many thanks.
It's stored in the database fine in 24 hour time format, but I'm currently just getting the first integer for the hour and minute (e.g. '19 0' instead of '19:00').
Here's the part that handles the time:
<div class="time">
<div class="hour"><%=hour(rs("ca_starttime"))%></div>
<div><%=minute(rs("ca_starttime"))%></div>
</div>
<div class="time">
<div class="hour"><%=hour(rs("ca_endtime"))%></div>
<div><%=minute(rs("ca_endtime"))%></div>
</div>
Many thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That's a good solution, I just added the following suggestion:
Open in new window
Yours would work too however, so I'll accept that as the solution.
Many thanks.