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 December 14th, 2004, 02:25 AM
Authorized User
 
Join Date: Oct 2004
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default dispaly date prob... help...

i have used prepared statement to insert date values in database..it is inserting..but the prob.. is that it cannot display date in dd-MON-yy format.i.e 26-jan-04

my query is like that:

java.util.Date dt1 = sdf.parse(request.getParameter("chq_date"));//inserts in database

pstmt.setDate(1, new java.sql.Date(dt1.getTime()));

<td><input value="<%= rs.getDate("chq_date") %>" name="chq_date"></td>//displays date

 
Old January 7th, 2005, 12:55 PM
Registered User
 
Join Date: Mar 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well you have display the date according to your needs. The database returns the date format - that it understands. You need to manipulate it for your display purposes.







Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort by date...select....display first item prob athos XSLT 2 November 3rd, 2008 04:31 PM
"Calendar" dispaly format mmk Access 3 May 25th, 2006 06:48 AM
dispaly date prob... help... abhit_kumar MySQL 1 December 14th, 2004 04:32 AM
dispaly date prob... help... abhit_kumar JSP Basics 0 December 3rd, 2004 08:00 AM
prob with comparing date in access nilesh_parmar Access 1 March 29th, 2004 10:59 AM





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