I've got a report made with Eclipse which builds a table with Strings
and Dates
through a SQL query, and running it locally it works fine, but when I bring it on my oracle server the day and month are switched, not visually, but just the data, let me do an example:
Dates generated locally on Eclipse (dd/mm/yy):
01/06/17 (1st jun)
31/12/17 (31st dec)
Same dates on report generated on server (dd/mm/yy):
06/01/17 (6th jan)
12/31/17 <- which shows the row retrieved by the query but leaves a blank space in the "my_date" column
Does anybody have an idea on why this happens? Thanks.
EDIT: these are my SESSION parameters, I can't change them right now but I'll keep you updated if that works out. Thanks!
Try changing the NLS_DATE_FORMAT
. For example:
ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD HH:MI:SS'
or:
ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY MM DD';
or whatever other format you like. Check the fine manual
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.