Page 1 of 1 1
Topic Options
#110282 - 2003-12-14 03:11 PM MessageBox Question 2
AlTaylor Offline
Fresh Scripter

Registered: 2003-12-08
Posts: 11
Is there a way to determine morning, afternoon, or evening and AM/PM?
Top
#110283 - 2003-12-14 03:30 PM Re: MessageBox Question 2
Richie19Rich77 Offline
Seasoned Scripter
*****

Registered: 2002-08-16
Posts: 624
Loc: London, England
You could do somethng like this:

Code:
If Split(@TIME,":")[0] > "12"

? Val(Split(@TIME,":")[0]) - 12":"+Split(@TIME,":")[1]+" PM"
Else
? @TIME+" AM"
EndIf



Description of what this code is doing

Split the @TIME macro into two, using the ":" as the split
If 1st past of the split (Hour Part) is above 12 then this means it is PM, Else it means it is AM.

If PM take away 12 from the Hour, giving you a 12 hour clock.


Edited by Richard Farthing (2003-12-14 03:35 PM)

Top
#110284 - 2003-12-14 04:42 PM Re: MessageBox Question 2
AlTaylor Offline
Fresh Scripter

Registered: 2003-12-08
Posts: 11
Richard, YOU DA MAN Thank you.

Al

Top
#110285 - 2003-12-14 04:50 PM Re: MessageBox Question 2
Richie19Rich77 Offline
Seasoned Scripter
*****

Registered: 2002-08-16
Posts: 624
Loc: London, England
Well that is very nice, but I am just a small fish in a big pond
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 363 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.05 seconds in which 0.021 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org