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

Problems with date comparison

Quote Reply
Problems with date comparison
Hi,
i define this:

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

And then i need to compare a date called "draw" in the table Users like this:
When draw is older or equal than today, do this
When draw is earlier than today, do that.
The output of both variables works fine, but when i use logic, this doesnt works:

<%if draw <= today%>do this
<%elseif draw > today%>do that
<%endif%>


It doesnt works, when i use "$today",
it doesnt works, when i change the ">" and "<"...

What i am doing wrong???
And: Are there other possibilities to compare a date with today-date?

Thanks in advance!

Coyu
Subject Author Views Date
Thread Problems with date comparison Coyu 2096 Aug 22, 2004, 2:20 AM
Thread Re: [Coyu] Problems with date comparison
Virginia 2018 Aug 31, 2004, 10:51 AM
Thread Re: [Virginia] Problems with date comparison
Coyu 1981 Sep 1, 2004, 5:13 AM
Post Re: [Coyu] Problems with date comparison
Dorette 1965 Sep 2, 2004, 12:16 PM