AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Cast String to Date

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Discussions
View previous topic :: View next topic  
Author Message
khoury
Guest





PostPosted: Sat Jan 06, 2007 8:10 am    Post subject: Cast String to Date Reply with quote



HI

I have a string s_d initialize with s_d ="31/12/2006" I want to cast to Date
d =31/12/2006 ( a French format) then I want to insert into a database as
like Access.
How can I do that?

Thanks for your help
Back to top
Paul Hamaker
Guest





PostPosted: Sat Jan 06, 2007 5:48 pm    Post subject: Re: Cast String to Date Reply with quote



You can't cast a string to date, but what you can do, is use fe
SimpleDateFormat, as shown in
http://javalessons.com/cgi-bin/fun/java-tutorials-main.cgi?sub=gui&ses=ao789
: lesson g48.
--
http://javalessons.com Paul Hamaker, SEMM
Teaching ICT since 1987
Back to top
Lew
Guest





PostPosted: Sun Jan 07, 2007 8:05 pm    Post subject: Re: Cast String to Date Reply with quote



khoury wrote:
Quote:
HI

I have a string s_d initialize with s_d ="31/12/2006" I want to cast to Date
d =31/12/2006 ( a French format) then I want to insert into a database as
like Access.
How can I do that?

Thanks for your help

If you must post a question to multiple newsgroups, cross-post rather than
multi-post. That is, send to your groups in one message, as this one is
cross-posted to clj.programmer and acl.java, possibly with a follow-up set to
just one group, as this one is set for f-u to clj.programmer.

This will consolidate all answers into a single thread across the multiple
groups, which is more useful and less frustrating for all concerned.

- Lew
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Discussions All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.