hai guys...do you know how to formating the currency data from database into java form
formating database
Collapse
X
-
Feeding "currency format Java" to Google would've been faster than typing anotherOriginally 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
-
Yes the original question is vague and I suspect has nothing, really, to do with a database. Try to rephrase the question by being clearer. For example: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
-
Note that 200.00 == 200.0000, the only difference being the number of decimal places displayed.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
-
The precise SQL used to get back a generated sequence number varies from database vendor to database vendor. (So much for JDBC and vendor independence!)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