I have a problem with zingChart and export.
on the axis-x, i have dates with hours in 24H. it's ok. But when I download csv or excel, I have the dates on 12H.
Here is an example :
here my definition for scaleX.
"scaleX":{
"zooming" : true,
"values": scaleXValues,
//values: '1513724400000:1516316400000:3600000',
"transform": {
"type": "date",
"all": "%dd/%mm/%y %H:%i"
}
// ,"max-items": 16
},
On graph, it's ok I have 13:00. And in my excel, I have this :
06/07/2019 10:00
06/07/2019 11:00
06/07/2019 12:00
06/07/2019 01:00
I'd like to have 13:00 at the end line.
Do you have an idea please ?
Thanks !
This is a known issue and already fixed in the dev stage. The next public release (due end of October) will contain this fix.
Regards.
Related
I am trying to do something as follows:
Date & Time: 27/09/2019 13:28
Working Day: Monday - Friday 8am - 5:30PM (08:00 -> 17:30) (NetworkDays)
Duration: 9.5hrs (09:30 hrs)
Outcome: 30/09/2019 13:28
Logic behind this is
Date & Time + Duration (Only inside the "Working Day") = Outcome
Working Days should only be from Monday - Friday 8am - 5:30pm and excludes weekends. I believe NetworkDays handles this?
If the Date & Time + Duration carries across weekend, then the time carries across to the following Monday.
Is there anything that can handle something like this?
Many thanks in advance
If A1 contains the Date/Time and A2 contains the Duration, then:
=WORKDAY(A1,INT((A1-INT(A1)-8/24+A2/24)/9.5*24))+8/24+MOD(A1-INT(A1)-8/24+A2/24,9.5/24)
I have an array of employees that contains time slots of their meetings
[ {"id": 1, "name": "John", "meeting": [{"Time_Start": "1/3/2015 12:30:00 PM",
"Time_End": "1/3/2015 13:30:00 PM"}]},
{"id": 2, "name": "Peter", "meeting": [{"Time_Start": "1/5/2015 7:00:00 AM",
"Time_End": "1/5/2015 8:00:00 AM"}]}]
Considering that a work day is from 8 to 17.00. How can I find the available time slots for a meeting with specific duration for a day? Every meeeting starts on a half or whole hour.
You could use a boolean array where every index in the array represents a half an hour of the time slot during the day. And you could store these array's in an object where the day format is the key.
Lets say I have two shifts at work.
Day shift is from 7:00 to 17:30
Night shift is from 18:00 to 4:30
Based on this numbers I want excel to return if its "Night Shift" or "Day Shift"
This is what i have so far with the IF statement
=IF(Q2>=7,"DAY SHIFT",IF(Q2<=17.3,"DAY SHIFT",IF(Q2>=18,"NIGHT SHIFT",IF(Q2<4.3,"NIGHT SHIFT"))))
But im not getting the results I want. Any ideas to correct the formula?
The following is what you are looking for, assuming that cell Q2 is a Date/Time value.
=IF(AND(MOD(Q2,1)>=(7/24),MOD(Q2,1)<=(17.5/24)),"Day Shift",IF(OR(MOD(Q2,1)<(4.5/24),MOD(Q2,1)>=(18/24)),"Night Shift",""))
The MOD(Q2,1) extracts the time portion of a date/time cell. These values are stored as decimal numbers, where 4:30 AM would be represented by 4.5/24 = 0.1875 (note that 30 minutes is half an hour, hence 4:30 AM is represented by 4.5/24 instead of 4.3/24, which would be 4:18 AM).
This should work:
=IF(AND(Q2>=7,Q2<=17.5),"DAY SHIFT", "NIGHT SHIFT")
But if you want to specify the "Night Shift", this would be better:
=IF(AND(Q2>=7,Q2<=17.5),"DAY SHIFT", IF(OR(Q2>= 18, Q2<4.5), "NIGHT SHIFT",""))
A little shorter:
=IF(OR(Q2<4.5/24,Q2>=3/4),"Night",IF(AND(Q2>=7/24,Q2<=17.5/24),"Day","?"))&" Shift"
I have an Excel sheet with two date-time columns: Start Date and End Date. I need to calculate overtime by determining how many hours and minutes were worked before 08:00 and after 16:30.
Examples:
COLUMN A COLUMN B
1 2017/01/04 16:00 2017/01/04 18:00
2 2017/01/05 18:00 2017/01/05 21:00
3 2017/01/08 08:00 2017/01/08 17:00
4 2017/01/09 07:00 2017/01/09 09:00
I know the calculation for duration between times (=TEXT(B1-A1,"h:mm")), but I'm struggling to determine if a date-time is before 08:00 or after 16:30.
I've played around with TIMEVALUE("8:00:00"), TIMEVALUE("8:00:00 AM") and TIME(8,00,00) in my calculation, but the it did not work,
e.g. =IF(A1<=TIMEVALUE("8:00:00 AM"),"Yes","No") returns "No" even for A4 (2017/01/09 07:00)
I'm struggling with the calculation and the logic on this one. So far i'm using,
=IF(MOD(F2,1)<8/24,8/24-MOD(F2,1),0)+IF(MOD(G2,1)>16.5/24,MOD(G2,1)-16.5/24,0)
Try this:
=IF(TIMEVALUE(A1)<=TIMEVALUE("8:00:00 AM"),"Yes","No")
Stick with treating time as time; only treat time as text when you have bad data (time as text is bad data) and then only enough to get it to be time as time.
To get the number of hours and minutes before 08:00 AM,
=MAX(0, TIME(8, 0, 0)-TIMEVALUE(TEXT(A2, "hh:mm;0;#")))
To get the number of hours and minutes after 16:30 AM,
=MAX(0, TIMEVALUE(TEXT(B2, "hh:mm;0;#"))-TIME(16, 30, 0))
In the following image you can see that I have left one group as true time and the forced the following group to be time as text¹. Both return correct results.
¹ Unless specifically formatted otherwise, numbers and dates/times are right-aligned in a cell; text is left-aligned.
I have written below excel formula to calculate working hours between two dates*(excluding sat and Sunday)*.
it works great if the start and end date is between Monday to Friday . if both days includes sat or Sunday then it raises error .
I'm looking help if the start date is in Saturday or Sunday it should take next business day as a start day and if end date is in Saturday or Sunday it should take previous business day as a end day.
Below is the example and my workings.Then it should return result in h:mm format
Startdate : enddate : Working hours(exc sat and sun)
9/28/2013 2:20 : 9/29/2013 2:39 : Both
9/29/2013 2:39 : 9/29/2013 2:39 : Both
9/29/2013 2:39 : 9/27/2013 13:18 : StartDate
9/27/2013 13:18 : 9/29/2013 2:22 : Enddate
10/1/2013 21:22 : 10/2/2013 0:33 : 3.10
9/30/2013 2:22 : 9/30/2013 5:22 : 3.00
and formula in c2
=IF(OR(WEEKDAY(A2)=1,WEEKDAY(A2)=7,WEEKDAY(B2)=1,WEEKDAY(B2)=7),IF(AND(OR(WEEKDAY(A2)=1,WEEKDAY(A2)=7),OR(WEEKDAY(B2)=1,WEEKDAY(B2)=7)),"Both",IF(OR(WEEKDAY(A2)=1,WEEKDAY(A2)=7),"StartDate","Enddate")),TEXT(B2-A2-(NETWORKDAYS.INTL(A2,B2,"0000000")-NETWORKDAYS(A2,B2)),"D")*24+TEXT(B2-A2-(NETWORKDAYS.INTL(A2,B2,"0000000")-NETWORKDAYS(A2,B2)),"H.MM"))
Let me know if you need any help
To calculate whole working days between two dates, excluding those dates:
=MAX(NETWORKDAYS.INTL(A1+1,B1-1),0)
To calculate working hours (remaining till the end of the day) for the first date:
=IF(WEEKDAY(A1,2)<=5,ROUNDDOWN(A1+1,0)-A1,0)
To calculate working hours (remaining till the end of the day) for the last date:
=IF(WEEKDAY(B1,2)<=5,ROUNDDOWN(B1+1,0)-B1,0)
Sum these up and here you go.