Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Need Urgent Help

I need urgent help regarding loading data.

My Scenario is:

My Production starts from 7:00 am in the morning till 2:00 am of the Next Day, but i want to show the whole production in the same day like in the mentioned excel file my Production for whole 14/09/2015 which is starting from 14/09/2015 7:00:00 Am till 15/09/2015 2:00:00 AM is 5989.


I want to show the next days two starting hours in the previous day (i.e 14/09/2015).

Please help.

I really need your help urgently.

Thanks and Regards,

Yawar Khan.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I have resolved the issue

If(Hour(Timestamp)>=2,Date-1,Date) as ProductionDate

View solution in original post

5 Replies
m_woolf
Master II
Master II

if(TimeField<= 2/24,DateField -1,DateField) as Date

Not applicable
Author

Hi Muhammad,

check the attached qvw

Regards

Gennaro

Anonymous
Not applicable
Author

Dear All,

Firstly, i would like to thanks both of you for quick reply.

But the issue is still unsolved.

Gennaro the qvw you have attached shows the correct result for only 13th Sep 2015, but the result for 14th is not correct. It is just calculating the results from 2:00 am to 12:00 am of the same day, i want to calculate the production of the other two hours from 12:00 am to 2 am of 15th Sep into 14th Sep.

Please find the below image for the resultant.Dates.jpg

Anonymous
Not applicable
Author

I have resolved the issue

If(Hour(Timestamp)>=2,Date-1,Date) as ProductionDate

Not applicable
Author

I believe that the correct formula is:



if(Hour(Timestamp)<='2', Date(Date-1),Date) as ProductionDate


Regards

Gennaro