This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applying logic tags for DATE

 
Shah Anwar
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
Well it has been days looking around the net for the answer for this. I'm still new to struts and i hope someone can assist me.

Here is my target:
1) To apply logic for date that is retrieved from the bean.
2) Print conditional output based on the cut-over date, 01/01/2011 (DD/MM/YYYY)
3) The logic :- If detDate >= 01/01/2011, the line will print out: "Old rates". Else, the line will print out: "New rates".

Here is what i have tried:


Unfortunately the output does not print any text instead only blanks.

Would appreciates some advice. Thank you in advance.
 
srikanth arroju
Ranch Hand
Posts: 66
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Anwar ,

I have tried to compare directly from logic tag but not able to format the date .
so i have done the comparision in Action and displayed the rate in view.






 
Shah Anwar
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you srikanth,

Unfortunately i don't have access to the java back-end side, were only given privilege to edit the .jsp files.

Therefore i've ended up with this javascript:



It seems to do the "make-up" work.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic