Question on formating a string time.

Thread: Question on formating a string time.

1. Senior Member
Join Date
Dec 1969
Posts
252

Question on formating a string time.

Hi i have these data that i retrieve from the database and stored in an array.<BR><BR>SUN(0) = Weekhrs(0) &#039;data in weekhrs is 8 hrs<BR>SUN(1)= Weekhrs(1) &#039;data in weekhrs is 18 hrs<BR>M(2)= Weekhrs(2) &#039; data in weekhrs is 8<BR>M(3)= Weekhrs(3) &#039; data in weekhrs is 18<BR>T(4)= Weekhrs(4)&#039; data in weekhrs is 8<BR>T(5)= Weekhrs(5)&#039; data in weekhrs is 18<BR>W(6)= Weekhrs(6)&#039; data in weekhrs is 10<BR>W(7)= Weekhrs(7)&#039; data in weekhrs is 18<BR>TH(8)= Weekhrs(8)&#039; data in weekhrs is 8<BR>TH(9)= Weekhrs(9)&#039; data in weekhrs is 18<BR>F(10)= Weekhrs(10)&#039; data in weekhrs is 8<BR>F(11)= Weekhrs(11)&#039; data in weekhrs is 18<BR>SAT(12)= Weekhrs(12)&#039; data in weekhrs is 10<BR>SAT(13)= Weekhrs(13&#039; data in weekhrs is 16<BR><BR>So basically the data in Weekhrs is stored in short time, and I just want to find a way to display the time like this :<BR>M-F 8-5pm, Sat 10-3pm or in the case above it should be displayed...<BR>M,T,TH,F,SUN 8-6pm, W 10-6pm SAT 10-4pm.<BR><BR>I am having a problem doing that and can&#039;t find a logic to make statements like that happen. I need some help thanks.

2. Senior Member
Join Date
Dec 1969
Posts
11,334

RE: Question on formating a string time.

THat doesn&#039;t even make sense... what&#039;s the 18 about?

3. God
Senior Member
Join Date
Dec 1969
Posts
18,177

12 + 6 (eop)

.

4. God
Senior Member
Join Date
Dec 1969
Posts
18,177