Hello Konstantin,

I want to do the following:

I produce reports from a database. 
e.g.
<esql:query>
select * from info_bericht  where Info_datum = #<xsp-request:get-parameter 
name="date"/>#       AND country ='<xsp-request:get-parameter name="GETcountry"/>'
</esql:query>

This is be done from a html form.
e.g.
<form action="IDC2/info_int.pdf">
<select name="GETcountry">
<optgroup label="L&auml;nder">
<option value="France">France</option>
<option value="Italy">Italy</option>
<option value="Netherland">Netherland</option>
<option value="Swiss">Swiss</option>
</optgroup>
</select>
<input type="text" name="date">
<input type="submit">
</form>

The actual date of the <esql:query/>  has to be in the format e.g. 01/29/2003, but we 
are a company in Germany were we use this date format: 29.01.2003.

So I would like to "translate" the 29.01.2003 into 01/29/2003 before I put it in the 
<esql:query/>.

SimpleDateFormat.parse() will do the job? I will try!
 
<xsp:logic>
   // perform your date translation using any method you like, e.g.
SimpleDateFormat.parse(), etc.
</xsp:logic>

Thanks a million!

-----Ursprüngliche Nachricht-----
Von: Konstantin Piroumian [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 30. Januar 2003 16:34
An: [EMAIL PROTECTED]
Betreff: Re: date translation


Please tell us what is the final target of your date translation and we'll
try to advice something.
In XSP you do it just the same way as in pure Java:
<xsp:logic>
   // perform your date translation using any method you like, e.g.
SimpleDateFormat.parse(), etc.
</xsp:logic>

--
  Konstantin

----- Original Message -----
From: "Scherler, Thorsten" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 30, 2003 18:28
Subject: AW: date translation


it is me again.

How can I do it with xsp?

-----Ursprüngliche Nachricht-----
Von: Scherler, Thorsten
Gesendet: Donnerstag, 30. Januar 2003 16:22
An: Cocoon-Users (E-Mail)
Betreff: date translation


Hello group,

if anybody need a date translation, here it is:

e.g. test.html?date=29.1.2003 (like we write in Germany) will be 1/29/2003.

<xsl:param name="date"/>
<xsl:param name="GETday"><xsl:value-of
select="substring-before($date,'.')"/> </xsl:param>
<xsl:param name="GETmonth_year"><xsl:value-of
select="substring-after($date,'.')"/></xsl:param>
<xsl:param name="GETmonth"><xsl:value-of
select="substring-before($GETmonth_year,'.')"/> </xsl:param>
<xsl:param name="GETyear"><xsl:value-of
select="substring-after($GETmonth_year,'.')"/> </xsl:param>
...
<xsl:value-of select="$GETmonth"/>/<xsl:value-of
select="$GETday"/>/<xsl:value-of select="$GETyear"/>

King regards

> Mit freundlichem Gruss,
>
> Thorsten Scherler
> Marketing / Telefonmarketing
>
> Weidmüller GmbH & Co.
> P.O. Box 2807
> 33058 Paderborn
> Tel.:+ 49 - 5252-960-350
> Fax:+ 49 - 5252-960-116
> eMail: [EMAIL PROTECTED]
> http://www.weidmueller.de
>
>

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to