hai guys...do you know how to formating the currency data from database into java form
formating database
Collapse
X
-
Originally posted by najmithans 4 ur sugestion,but i need it as soon as posible,,
response in here. If might even give you spoonfeeding code which you're not going
to find here.
kind regards,
JosComment
-
Originally posted by r035198xI don't understand the "into java form part".
I have a date:
java.sql.Date date = ..
but I would like to format it as a string in the following format:
2008-03-30 22:30:57
using time zone UTC.
See? It's not that hard to be coherent.Comment
-
Originally posted by najmiok..
let say i have enter into the ms access database $200.00..
for your information, i already format the decimal point into 2 in db.
so when i call back into java form it come out with this value $200.0000
How can one control the number of decimal places displayed? There are several classes that can do this, including:
java.text.Decim alFormat: http://java.sun.com/javase/6/docs/ap...malFormat.html
java.util.Forma tter: http://java.sun.com/javase/6/docs/ap...Formatter.html
and the format methods of PrintWriter, PrintStream and String: format method APIComment
-
Originally posted by najmican anybody help me how to generate auto id or number
There is also some support for doing this in the JDBC API:
int executeUpdate(S tring sql, boolean autoGeneratedKe ys)
ResultSet getGeneratedKey s()
I haven't used these because as soon as I could, I moved up from JDBC to Hibernate, and haven't looked back.Comment
Comment