Wrox Programmer Forums
Go Back   Wrox Programmer Forums > PHP/MySQL > MySQL
|
MySQL General discussion about the MySQL database.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the MySQL 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:24 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 December 14th, 2004, 04:32 AM
Friend of Wrox
 
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

You can format the date string before dislpaying it in the text box.

Please check the following link for date formats example:

http://www.codetoad.com/asp/format_date_time.asp

Om Prakash





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 JSP Basics 1 January 7th, 2005 12:55 PM
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.