"josh3006" <jo******@insyn chro-dot-net.no-spam.invalid> wrote in message
news:43******** **************@ authen.yellow.r eadfreenews.net ...
Hi there
I'm new in DB2, currently i'm into java development
The problem that i'm facing is that when i use JSP page to save, the
date is correct when i pass(from JSP page) to database, but when i
checked inside the database the date stored is different than what i
passed or saved into the datbase. Can anyone have idea on this ?
If possible, how can i see the server time using DB2 sql command ?
i have tried now(),getDate,. . and so on...
Can anyone assist me on this problem
Thanks
Date columns are always stored internally within DB2 the exact same way,
regardless how it is sent to DB2 for storage. The internal format is YYYMMDD
in packed decimal without sign bits, using a total of 4 bytes (2 numbers per
byte).
The retrieval display format differs depending on the language and country
code of the database server and/or the client. The display format always has
separators such as dashes, slashes, periods, etc depending on which
language/country code. The total length of display format is 10 bytes
character.
You can change the display format for the date from the default of your DB2
installation by using the CHAR command as described in the SQL Reference Vol
1. There are several defined formats to choose from such as ISO, USA, etc.