In Access DB is YYYY.MM.DD HH:MM:SS but servlet reads YYYY-MM-DD HH:MM:SS

In access database it saving data normaly YYYY.MM.DD HH:MM:SS. With insert also ok, but then i am displaying with String str4=mdb_rs.getString(1);
i got format YYYY-MM-DD HH:MM:SS
Why?

In access database it saving data normaly YYYY.MM.DD
HH:MM:SS. With insert also ok, but then i am
displaying with String str4=mdb_rs.getString(1);
i got format YYYY-MM-DD HH:MM:SS
Why?Since you are using getString(), the java.sql.Date object which is created gets converted to a String.
Refer to API docs for java.sql.Date.toString(). You will know where the format comes from!!! :)

Similar Messages

Maybe you are looking for