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

Two dates: How many days are between?

Quote Reply
Two dates: How many days are between?
Hi, i have two dates:

Code:
<%set today = GT::Date::date_transform($date, '%dd%.%mm%.%yyyy%', '%yyyy%-%mm%-%dd%')%>
<%set someday = GT::Date::date_transform($Val_Date, '%yyyy%-%mm%-%dd% %HH%:%MM%:%ss%', '%yyyy%-%mm%-%dd%')%>
Now i need the number of the days between "today" and "someday".

How can i find this?

Thanks in advance and

Greetings from germany!

Coyu
Quote Reply
Re: [Coyu] Two dates: How many days are between? In reply to
Hi,

You could try this;

Code:
<%set today = GT::Date::date_transform($date, '%dd%.%mm%.%yyyy%', '%yyyy%-%mm%-%dd%')%>
<%set someday = GT::Date::date_transform($Val_Date, '%yyyy%-%mm%-%dd', '%yyyy%-%mm%-%dd%')%>
<%GT::Date::date_diff($today,$someday)%>

No guarantees <G>

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates