I have a table with a date column (column 3 named dt). If I use
dateadd to add one day it seems that the result is no longer a date.
Times now appear. Is that how its supposed to work?
> dbGetQuery(con, "show columns from BOD")
COLUMN_NAME TYPE IS_NULLABLE KEY DEFAULT
1 Time DOUBLE(17) YES NULL
2 demand DOUBLE(17) YES NULL
3 dt DATE(8) YES NULL
> dbGetQuery(con, "select * from BOD")
Time demand dt
1 1 8.3 2010-01-17
2 2 10.3 2010-01-18
3 3 19.0 2010-01-19
4 4 16.0 2010-01-20
5 5 15.6 2010-01-21
6 7 19.8 2010-01-22
> dbGetQuery(con, "select dateadd('day', 1, \"dt\") from BOD")
DATEADD..day...1...dt..
1 2010-01-18 00:00:00.0
2 2010-01-19 00:00:00.0
3 2010-01-20 00:00:00.0
4 2010-01-21 00:00:00.0
5 2010-01-22 00:00:00.0
6 2010-01-23 00:00:00.0
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/h2-database?hl=en.