Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

How to change data during LOAD

Hi

I have two fields in my data as follows:

DateTime
2013.08.2523:00
2013.08.2600:00

Is it possible to change the date and time to the following when time is 00:00 (changes in highlighted in orange)

DateTime
2013.08.2523:00
2013.08.2524:00

Many thanks

Shaun

1 Solution

Accepted Solutions
Partner
Partner

Re: How to change data during LOAD

Yes, use Previous command..

IF(time(TimeField,'HH:MM')='00:00', Date(Previous(DateField),'YYYY.MM.DD'),DateField) as DateField

4 Replies
Partner
Partner

Re: How to change data during LOAD

have you tried IF statement?

IF(time(TimeField,'HH:MM')='00:00', '24:00',TimeField) as TimeField

IF(time(TimeField,'HH:MM')='00:00', Date(DateField-1,'YYYY.MM.DD'),DateField) as DateField

Not applicable

Re: How to change data during LOAD

For the date field, is it possible to take from previous record date rather than minus 1? This is because some dates are Mondays, and I want it to be Friday (i.e. the last record date) rather than Saturday (if using -1).

Thanks for your help!

Partner
Partner

Re: How to change data during LOAD

Yes, use Previous command..

IF(time(TimeField,'HH:MM')='00:00', Date(Previous(DateField),'YYYY.MM.DD'),DateField) as DateField

Not applicable

Re: How to change data during LOAD

Thanks for your help!