hi
i need to calculate different between DateTime
i have 2 param for start date and end date
for example 2013/01/01 10:30 & 2013/01/03 17:00
and i need thet return count hourse between 07 util 15 and from 15 util 19 and from 19 util 07
please help me how to solve it
thanks
Loading
VulpesPosted Jan 3, 2013, 9:44 AM
Try this instead:
Vahid BakhtiaryPosted Jan 10, 2013, 12:06 PM
it's correct
thanks
VulpesPosted Jan 10, 2013, 10:43 AM
Vahid BakhtiaryPosted Jan 10, 2013, 8:36 AM
i meet a problem calculate Holidays
namely if between 2013/01/01 10:00 and 2013/01/10 was Thursday and Friday
the hours calculate for From19To07
for example in a day is 24 hour if it was Thursday and Friday the hour don't add to
From07To15 and From15To19
and add to From19To07
From19To07+=24
please help me for solve it
thanks
Vahid BakhtiaryPosted Jan 4, 2013, 2:40 AM
Vahid BakhtiaryPosted Jan 3, 2013, 3:50 AM
but it isn't my means
in a day time start from 07:00 util 07:00 next day
and i get 2 paramaters date for example 2013/01/01 10:00 & 2013/01/02 10:00
now i want calculate it that many hour is between 07:00 util 15:00 and many hour is between 15:00 util 19:00 and many hour between 19:00 util 07:00
for example for up parameter
7-15 -> 8
15-19 -> 4
19-7 -> 12
if it isn't clear tell me
VulpesPosted Jan 2, 2013, 11:14 AM
Matija SovicPosted Jan 2, 2013, 10:34 AM
http://www.c-sharpcorner.com/UploadFile/mahesh/working-with-datetime-using-C-Sharp/
You need to use TimeSpan!