-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hello ZK professionals,
I am developing a module where i needs to calculate next date and time after some time interval(after some hours)
i am nearer to output.now i have just calculated next date and time after some time for e.g. date is 27/11/2012 and time is 9.00 am
then i got next date and time after 5 hours as 27/11/2012 , 2.00 pm after 2nd time say 6 hours will be 27/11/2012 , 8.00pm this output came by considering 24 hour time period ( as supported by calender class)
but in my module time period is from 9am to 6pm so that above output should come as after 5 hours as 27/11/2012 , 2.00 pm after 2nd time say 6 hours will be 28/11/2012 , 11.00pm
so how to get this output...i have tried for daterange but i failed in that.
so please help me...its urgent work assigned to me
Thanks in advance
well i got my que ans.....
i used calender class n its functions to get next date n time...n some logic to get it in between 9am to 6pm range...
in between i was having 1 more query regarding sunday....
that problem also i have solved..but now without considering sunday i get next date with its time,,,,but the value of AM / PM goes wrong...
if anybody is having idea why m going wrong.plz let me know about it..
Thanks in advance
Regards
Nil
Asked: 2012-11-27 11:34:31 +0800
Seen: 64 times
Last updated: May 22 '13