Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Adding x number of days...

Quote Reply
Adding x number of days...
I'm trying to figure out how I would add 'x' number of days to a variable. Current format is;

25-Jan-2003

If I want to add 15 days to that, to get 10-Feb-2003 Unsure Doing dates such as 5 days on 20-Jan-2002 is pretty easy...just slice up the variables, add 5 to the date, and voila....but when moving over to extra months, it gets a lot more complicated :(

My heads hurting even thinking about how to do it :/

Any help is much appreciated.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Adding x number of days... In reply to
GT::Date

date_add [/url]

Quote:


Returns date derived from arg1 + arg2, where the second argument can be either a date or number of days.
Quote Reply
Re: [cwi] Adding x number of days... In reply to
Duh...how on earth did I miss that feature! Unsure

Cheers.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Adding x number of days... In reply to
Probably the same way you missed all these Tongue

http://gossamer-threads.com/...g=how%20miss;#224497

http://www.gossamer-threads.com/...i?post=204548#204548

http://gossamer-threads.com/...h_string=duh;#231696

http://gossamer-threads.com/...h_string=duh;#184374

Last edited by:

Paul: Feb 24, 2003, 6:00 AM
Quote Reply
Re: [Paul] Adding x number of days... In reply to
I'll ignore that comment Paul! Mad

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Paul] Adding x number of days... In reply to
Oh my god, Paul's memory is awesome, or is it that you only pays attention to Andy:) hehe
Quote Reply
Re: [xpert] Adding x number of days... In reply to
Nah, it's just that Andy uses the word "duh" alot so they were fairly easy to pick up with a search :)
Quote Reply
Re: [Andy] Adding x number of days... In reply to
Andy,

Last I looked, the GT module documentation had a good explanation as well.

One thing I did find, is that you can't assume the date is in any specific format, until you actually convert it. If things seem to not work, check the date format, and make sure it's in the format you expect. there are a couple of areas where it seems (or is even stated) to be in one format, but it's really in another.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [xpert] Adding x number of days... In reply to
No, I think I'm first on Paul's list.
Paul reeeaaally hates me. Tongue

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...