How can I get the hour (24-hour format) stored time value

I have a field called start_time in a database mysql and all I have to do, but unable to do so far is part time 24-hour (without leading zeros) in this field.  I tried all the date functions, including date('G'), getdate and start_time table [hours].

I get either today's date & time, or just first digit of he in time.

What follows is the closest, he came to work, but it's the ethat on is back just the first digit of the hour if there are two numbers in 24-hour format (ex: 14:00 = 14, it returns oly 1)

<? PHP

;

;

;

$start_time = $row ['start_time'];
$hour = $start_time [h];

;

;

;

? >

Help, please!  I spent too much time on such work of subordinate.  According to me, part of my problem is that I am under PHP 4.

Thanks in advance,

Marcus

marcusinfla wrote:

Do you mean similar to the following?  I don't seem to get a value

No, it should be part of the SQL statement:

$lookup = "SELECT *, HOUR(start_time) AS start_hour FROM $tbl";

Tags: Dreamweaver

Similar Questions

Maybe you are looking for