Jump to content

date and time quiery


utdfederation

Recommended Posts

hi all,

 

i have a script that im trying to add the @ sign after the date.

 

code:

<td align='left' class='forumheader3' nowrap>".(($wardate == -1) ? "" : date($conf['formatdetails'], $wardate))."</td>

 

resulting in this:

1 Apr 2012 21:30

 

but i am trying to get the @ after the date so the result would be this:

1 Apr 2012 @ 21:30

 

any help please

Link to comment
https://forums.phpfreaks.com/topic/260483-date-and-time-quiery/
Share on other sites

looks like your date format is coming from config.

 

You can change the date format in your config and insert \@ between date and time.

$conf['formatdetails'] = 'd M Y H:i';

to

$conf['formatdetails'] = 'd M Y \@ H:i';

 

Edit:

 

This will change the date format whereever the config date format is used, so if you dont want to do that, you can specify this format for this code only:

 

<td align='left' class='forumheader3' nowrap>".(($wardate == -1) ? "" : date('d M Y \@ H:i', $wardate))."</td>

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.