Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

Quick question!

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
Da_Luke
Smarty Rookie


Joined: 16 Nov 2006
Posts: 14

PostPosted: Thu Dec 21, 2006 5:00 pm    Post subject: Quick question! Reply with quote

Is it possible in a datetime format like: 2006-12-21 17:54:09 (000-00-00 00:00:00) to subtrack 1 day in a formula?? (just php not smarty, i know wrong forum but it's something small Wink )

Greetz and tnx anyway!
Back to top
View user's profile Send private message
Pap
Smarty Regular


Joined: 21 Jun 2006
Posts: 69
Location: Denver, CO

PostPosted: Thu Dec 21, 2006 6:54 pm    Post subject: Reply with quote

This is indeed the wrong forum to ask.

but...

echo date('c', strtotime('-1 day', strtotime('2006-12-21 17:54:09')));

You'll need to lookup the date function in php and change 'c' to the exact format you need, since it returns the ISO 8601 format instead of that format you want.
_________________
Don't be stupid, be a Smarty™.
Come and join the P-H-Party.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP