aspose file tools
The moose likes JDBC and the fly likes how to update date in mssql 2k Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "how to update date in mssql 2k" Watch "how to update date in mssql 2k" New topic
Author

how to update date in mssql 2k

amit taneja
Ranch Hand

Joined: Mar 14, 2003
Posts: 806
hi,

can any body tell me how to update date in ms-sql 2k ..
as it store date in "DD/MM/YYYY" fromat .

so if we make String of above format and then update it or
we update the date object ?
but date format is in other format ? not like the above..?
so what we do to convert to above format ?

kindly write in details


Thanx and Regards,
Amit


Thanks and Regards,<br />Amit Taneja
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

This belongs in the JDBC forum... moving it there...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26496
    
  78

Amit,
Use a prepared statement. Then you don't have to worry about the formatting and your SQL is not database specific:


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how to update date in mssql 2k
 
Similar Threads
change date format
how to update date in ms-sql
date validation
Date Format
Java Date