How to make this time logic
<p>From the store i am getting 
open time and close time
i can get open time  14(just integer not time format) oclock today 
and close time 2(just integer not time format) oclock tomorrw</p>

<p>I want to form a time list<br>
that starts from the 14+45mint then 15 mint interval untill tomorrw 2 oclock
How can i make this. </p>

<p>I am trying it something like this, but i am unable to fix interval for next day.</p>

<pre><code>ePOSEntities db = new ePOSEntities();
int d = Convert.ToInt32(DateTime.Today.DayOfWeek);
StoreTiming st = (from s in db.StoreTimings 
                  where s.Week_Day == d 
                  select s).FirstOrDefault();
var time = DateTime.Now;
DateTime OpenDtim = Convert.ToDateTime(st.OpenTime);
DateTime CloseDtim = Convert.ToDateTime(st.CloseTime).AddDays(1);

for (DateTime x = OpenDtim; x &lt;= CloseDtim; x++) { 

}
</code></pre>
