Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
LOAD
...
...
ScheduledDateTime
IF (time(time#(ScheduledDateTime, 'dd/mm/yyyy hh:mm'), 'hh:mm') < '10:00', '1st wave', 'Normal') AS "First Wave",
...
...
FROM xyz.qvd
what's wrong with the syntax above? why can't I display the First Wave field?
thanx
Better not to use formatting functions for comparison, I would rather try like:
IF (hour(time#(ScheduledDateTime, 'dd/MM/yyyy hh:mm')) < 10, '1st wave', 'Normal') AS "First Wave
Also note:
mm -> minute
MM -> Month
LOAD
...
...
ScheduledDateTime <- If it is a field then use a comma at the end: ScheduledDateTime ,
IF (time(time#(ScheduledDateTime, 'dd/mm/yyyy hh:mm'), 'hh:mm') < '10:00', '1st wave', 'Normal') AS "First Wave", <- Write the aliasinthis way: First_Wave without "
...
...
FROM xyz.qvd
Let me know
Hi,
you can use the below.
=IF (num(time(time#('10/16/2014 8:05', 'dd/mm/yyyy hh:mm'), 'hh') )<num(Time#('10','hh')), '1st wave', 'Normal')
Hi Fra,
please make sure comma placing between two line.
in your line no comma between two line.
try this script
ScheduledDateTime ,
IF (time(time#(ScheduledDateTime, 'dd/mm/yyyy hh:mm'), 'hh:mm') < '10:00', '1st wave', 'Normal') AS "First Wave",
i've tested your expressions
load
IF (time(time#('16.10.2014 9:00', 'DD.MM.YYYY hh:mm'), 'hh:mm') < '10:00', '1st wave', 'Normal') AS "First Wave"
autogenerate 1;
works fine.
Maybe you have specified wrong format 'dd/mm/yyyy hh:mm' for ScheduledDateTime field?
tried this but nothing:
IF (hour(time#(ScheduledDateTime, 'DD/MM/YYYY hh:mm'))<10, '1st Wave', 'Normal') AS FirstWave,
TimeStamp format on Main is set the following: 'DD/MM/YYYY hh:mm:ss[.fff]'
that's instead what I see in ScheduledDateTime field: 27/09/2014 11:15 (in Excel export it seems to be a text and not a number)
thanx