cubes icon indicating copy to clipboard operation
cubes copied to clipboard

Extracting the week from a date in Oracle

Open pablolmedorado opened this issue 8 years ago • 0 comments

Hello everyone;

I use Oracle as backend and I'm having problems when I try to extract the week from a datetime field.

I tried using "extract" in the mapping configuration but it seems that Oracle does not allow it (I can do it with day, month, year, hour, minute and second). Https://docs.oracle.com/cd/B19306_01/server.102/b14200/functions050.htm

I read that it is possible to do so using TO_NUMBER(TO_CHAR(datetime_field, 'ww')) and I thought I would use the "function" field instead of "extract", but the syntax of the "function" field does not allow it.

Any ideas? Thanks in advance!

pablolmedorado avatar Apr 19 '17 14:04 pablolmedorado