Re: how to convert JAVA string in "hh:mm dd/mm/yyyy" to sql datetime format?
- From: Ian Wilson <scobloke2@xxxxxxxxxxxxx>
- Date: Mon, 19 Mar 2007 11:49:16 +0000
shivaraj wrote:
Hi,
In my JAVA code I have a string in "15:45 03/17/2007" this format.
Could any one let me know how can i insert/update it on to sql
database where the column is of type datetime ? If any one has a
sample code to do this, that will be great.
Your subject line says "hh:mm dd/mm/yyyy" but the example you quote is not a valid date in that format, there is no month 17.
I'd use String split to decompose the date and time and the use String concatenation to reassemble the parts in the form expected by SQL.
.
- References:
- Prev by Date: how to convert JAVA string in "hh:mm dd/mm/yyyy" to sql datetime format?
- Next by Date: Re: how to convert JAVA string in "hh:mm dd/mm/yyyy" to sql datetime format?
- Previous by thread: how to convert JAVA string in "hh:mm dd/mm/yyyy" to sql datetime format?
- Next by thread: Re: how to convert JAVA string in "hh:mm dd/mm/yyyy" to sql datetime format?
- Index(es):
Relevant Pages
|
|