Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
my business day is from 04am of today to 04am of tomorrow.
For Exemple transaction done at 2am of 05/09/2016 it should be stored on 04/09/2016.
So i want to create a fild 'BusinessDate'
like :
if(time(Createdate,'hh:mm')> '00:00' and time(Createddate,'hh:mm' )<'04:00' , Transdate-1 , Transdate) as BusinessDate,
Createdate and Transdate exist in my Table.
Thanks
Maybe something like this:
date(floor(Createddate - 4/24)) as BusinessDate
- Marcus
So whats the issue you are facing???
Is it that the expression not working correct??
yes i want to create this BDATE
and this Businessday filed start from 04:00 to 04:00 of next day.
I tried the same expression and it worked well.
If i am not wrong, do you need the output something similar to this??
try maybe :
yes this is what i need.
But how you wrote it and where.
Hi
To whom are you asking??
to you
you wrot it in the editor right.
can you write it again for me please
or put a screenshot of the editor please
thanks
You can write this script:
This is the dummy data i have created.
A:
LOAD * INLINE [
Time
02:02
01:04
05:32
10:30
01:40
03:59
07:56
21:54
18:20
16:30
17:45
];
B:
LOAD Time,
if(time(Time,'hh:mm')> '00:00' and time(Time,'hh:mm' )<'04:00' , Date(Today()-1) , Date(Today())) as Businessdate
Resident A;
DROP Table A;