Change format of $insert[story_time]
trackpads 1
From: -
From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: Change format of $insert[story_time]
trackpads
OP
1
From: -
From: -
Change format of $insert[story_time]
Thanks!
Thanks!
1 Re: Change format of $insert[story_time]
timbo 0
From: -
From: -
Change format of $insert[story_time]
I put this at the top of the Story, news_col_news and news template:
<?php
global $insert;
$insert[story_time] = date("l j F Y",strtotime($insert[story_time]));
It changes the output to, for example:
Friday 11 February 2005
You can remove the Y to shorten it...
$insert[story_time] = date("l j F",strtotime($insert[story_time]));
Outputs:
Friday 11 February
I put this at the top of the Story, news_col_news and news template:
<?php
global $insert;
$insert[story_time] = date("l j F Y",strtotime($insert[story_time]));
It changes the output to, for example:
Friday 11 February 2005
You can remove the Y to shorten it...
$insert[story_time] = date("l j F",strtotime($insert[story_time]));
Outputs:
Friday 11 February
Is there a way to shorten this variable?
For example, it currently is:
2005-02-11 10:47:48
Maybe I can change it just to the date or maybe even subtract the exact second off of it to save space?