John Reynolds <[EMAIL PROTECTED]> wrote:
> Hi Mike, thanks for the quick reply!
>
> Here is where i think all those beers from college are taking a toll =)
>
> ==> assumes your DateTool is named "date" <==
>
> Can in instantiate the tool from within the template? right now i am not
> putting the
John Reynolds <[EMAIL PROTECTED]> wrote:
> What I can_t crack is how to use the Date tool IN THE TEMPLATE to format
> the string. Any help is appreciated.
Here's one example in macro format (assumes your DateTool is named "date"):
#macro (formattedDateTime $dateValue)${date.format("h:mm a M d
Hi John,
I was glad to see this recently discussed on the list. I believe i have all
the puzzle pieces but i'm having trouble fitting them together.
Let me simplify my application with an example.
Using struts and JSP, the struts action retrieves a list of Birthday
objects, where Birthday.java i
Hi John,
> I discovered that the DateTool code needed to be included into a #Set().
> In case another newbie is as retarded as I am here's the code I used:
>
> #set ($priorDate = $shoppingCartItem.priorDate) ## prior Cart Date
> #set ($datePick = $date.format('M/d/',$priorDate)) ## Cart Date
- Original Message -
From: "Shinobu Kawai" <[EMAIL PROTECTED]>
To: "Velocity Users List" <[EMAIL PROTECTED]>
Sent: Saturday, October 23, 2004 9:41 AM
Subject: Re: Velocity DateTool Coding Examples
> hi john,
>
> > I'm a Velocity newbie and have no
hi john,
> I'm a Velocity newbie and have not been able to use the DateTool properly. I
> understand the methods but have not been successful coding them so they render
> properly in the Template. Need to convert a Date object to a string DD/MM/ for
> display and convert a String object DD/
I haven't used the DateTool. I have my own Formatter class that formats date
as well as other stuff. A code snippet is as follows:
import java.text.SimpleDateFormat;
//format a date object to dd/MM/ date string
java.util.Date value = new Date();
SimpleDateFormat sdf = new SimpleDateFormat("d
I'm a Velocity newbie and have not been able to use the DateTool properly. I
understand the methods but have not been successful coding them so they render
properly in the Template. Need to convert a Date object to a string DD/MM/ for
display and convert a String object DD/MM/ to Date ob