Jump to content

Simple date php mysql question


jmcall10

Recommended Posts

I suppose you can just remove the colon and tailing zeros...but for the sake of giving you a quick solution, here is a way which should also work:

[code]$testtime = strtotime($thisTime);
$newtime = date("G:i", $testtime);[/code]

If [!--coloro:#3333FF--][span style=\"color:#3333FF\"][!--/coloro--]$thisTime[!--colorc--][/span][!--/colorc--] = '20:00:00'.....then the output of [!--coloro:#3333FF--][span style=\"color:#3333FF\"][!--/coloro--]$newtime[!--colorc--][/span][!--/colorc--] will equal '20:00'. Hope that helps.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.