Kimmi
07-06-2009, 06:15 PM
I know how to create a variable. What I'm asking is, how do you put actual text into a variable?
For instance, say that I create the variable:
<c:set var="date" value="${param.year} ${param.month} ${param.day}"/>
What if I wanted to add a dash in between the variables? I want to make it so that when I insert it into the database, it automatically has a dash in between everything so that it's in the correct date format.
How would I do that? If I did it like this....
<c:set var="date" value="${param.year} - ${param.month} - ${param.day}"/>
...then it would think I wanted to SUBTRACT everything. Please help me. This is probably the most simple question anyone could ever ask.
For instance, say that I create the variable:
<c:set var="date" value="${param.year} ${param.month} ${param.day}"/>
What if I wanted to add a dash in between the variables? I want to make it so that when I insert it into the database, it automatically has a dash in between everything so that it's in the correct date format.
How would I do that? If I did it like this....
<c:set var="date" value="${param.year} - ${param.month} - ${param.day}"/>
...then it would think I wanted to SUBTRACT everything. Please help me. This is probably the most simple question anyone could ever ask.