Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
|
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 10th, 2008, 06:17 AM
Registered User
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default hi! datetime format question..

Hi guys! this is my first post there :)
I need help about a problem on jsp date formatting:
I use jakarta date-time library in order to format date:
Code:
<dt:format pattern="yyyy-MM-dd"><dt:currentTime/></dt:format>
I need the date formatted in that style when i write sql select:
Code:
<sql:param value="${param.selectedDate}"/>
how can I format currentTime / param.selectedDate and pas that as a parameter in sql?
I need smth like:
Code:
<c:choose>
 <c:when test="${empty param.selectedDate}">
   <sql:param value="${CURRENT DATE FORMATED "yyyy-MM-dd"}"/>
 </c:when>
 <c:otherwise>
  <sql:param value="${param.selectedDate FORMATED "yyyy-MM-dd"}"/>
 </c:otherwise>
</when>
Any idea?
Thanks in advance!






Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL DateTime format for Excel fmoon606 XSLT 8 May 23rd, 2008 05:35 PM
Convert DateTime Format dnyanubhamare C# 2005 2 February 25th, 2008 09:06 AM
Format datetime deb1980 ASP.NET 2.0 Basics 7 April 17th, 2007 12:35 AM
DateTime format quirks ADMystery ASP.NET 1.0 and 1.1 Professional 5 September 18th, 2006 06:02 AM
converting char to datetime format santoshpayal SQL Language 0 September 11th, 2006 06:13 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.