/    Sign up×
Community /Pin to ProfileBookmark

my problem is with the dates values, when i fetched from database..it does not shows in dd-MMM-yy format.i.e 26-jan-04.

actually i inserted date values in the database using below query..its working..

String pattern = “dd/MM/yyyy”;

SimpleDateFormat sdf = new SimpleDateFormat(pattern);
sdf.setLenient(false);

java.util.Date dt = sdf.parse(request.getParameter(“pay_date”));
pstmt.setDate(1 new java.sql.Date(dt.getTime()));

and when i fetched the values from database using below query:

<input value=”<%= rs.getDate(“pay_date”) %>” name=”pay_date”>

it does not display date in dd-MMM-yy format.and display in some other format.

plz make me possibel to work out this prob..and provide me the query for that..

to post a comment
Java

1 Comments(s)

Copy linkTweet thisAlerts:
@Khalid_AliDec 15.2004 — I pointed you in right direction in your previous thread....why you had to waste forum resources and post a new thread on the same issue?
×

Success!

Help @abhit_kumar spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.27,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...