5 Replies Latest reply on May 30, 2013 4:12 PM by Isaac Cigarroa

# Custom Production days run from 6:00 am to 6:00am

At this time i have al my productoction days 00:00 to 23:59

where i want is to  custom production days run from 6:00 am to 6:00am

It's possible....

but i have a filter with a relative date of the current month and then i do thedifference between actual month and previous month.

• ###### 1. Re: Custom Production days run from 6:00 am to 6:00am

You could create a date calculation that adds 6 hours to the date you have to move the day as you need

You would only use this for the day/mm/yy portion and use your real date for the time portion

1 of 1 people found this helpful
• ###### 2. Re: Custom Production days run from 6:00 am to 6:00am

thanks..

But the date field, need to be a datetime field?

• ###### 4. Re: Custom Production days run from 6:00 am to 6:00am

yeah! it works, but not understand the last part how to use.. (You would only use this for the day/mm/yy portion and use your real date for the time portion ), sorry i am to green for tableau.

• ###### 5. Re: Custom Production days run from 6:00 am to 6:00am

it doesn't work but

i try this and works but I only get 2 days only..

if

(DATEPART('day',[FechaCarga])=1 or DATEPART('day',[FechaCarga])=2) then

if (DATEPART('day',[FechaCarga])=1 and DATEPART('hour',[FechaCarga])>=6) then "Dia 1" else

if (DATEPART('day',[FechaCarga])=2 and DATEPART('hour',[FechaCarga])<6) then "Dia 1"

elseif

(DATEPART('day',[FechaCarga])=2 or DATEPART('day',[FechaCarga])=3) then

if (DATEPART('day',[FechaCarga])=2 and DATEPART('hour',[FechaCarga])>=6) then "Dia 2" else

if (DATEPART('day',[FechaCarga])=3 and DATEPART('hour',[FechaCarga])<6) then "Dia 2"

elseif

(DATEPART('day',[FechaCarga])=3 or DATEPART('day',[FechaCarga])=4) then

if (DATEPART('day',[FechaCarga])=3 and DATEPART('hour',[FechaCarga])>=6) then "Dia 3" else

if (DATEPART('day',[FechaCarga])=4 and DATEPART('hour',[FechaCarga])<6) then "Dia 3"

elseif

(DATEPART('day',[FechaCarga])=4 or DATEPART('day',[FechaCarga])=5) then

if (DATEPART('day',[FechaCarga])=4 and DATEPART('hour',[FechaCarga])>=6) then "Dia 4" else

if (DATEPART('day',[FechaCarga])=5 and DATEPART('hour',[FechaCarga])<6) then "Dia 4"

elseif

(DATEPART('day',[FechaCarga])=5 or DATEPART('day',[FechaCarga])=6) then

if (DATEPART('day',[FechaCarga])=5 and DATEPART('hour',[FechaCarga])>=6) then "Dia 5" else

if (DATEPART('day',[FechaCarga])=6 and DATEPART('hour',[FechaCarga])<6) then "Dia 5" end

end

end

end

end

end

end

end

end

end

end 