2
« on: October 12, 2017, 12:00:12 PM »
Working on adding clock to to a script and wondering if this can be shortened some how.
Not a big fan of the 24 hour format.
;========= convert 24hr to 12 hr
if %24hrs = 00
{
set %HH 12
}
if %24hrs = 01
{
set %HH #spc , 1
}
if %24hrs = 02
{
set %HH #spc , 2
}
if %24hrs = 03
{
set %HH #spc , 3
}
if %24hrs = 04
{
set %HH #spc , 4
}
if %24hrs = 05
{
set %HH #spc , 5
}
if %24hrs = 06
{
set %HH #spc , 6
}
if %24hrs = 07
{
set %HH #spc , 7
}
if %24hrs = 08
{
set %HH #spc , 8
}
if %24hrs = 09
{
set %HH #spc , 9
}
if %24hrs = 10
{
set %HH 10
}
if %24hrs = 11
{
set %HH 11
}
if %24hrs = 12
{
set %HH 12
}
if %24hrs = 13
{
set %HH #spc , 1
}
if %24hrs = 14
{
set %HH #spc , 2
}
if %24hrs = 15
{
set %HH #spc , 3
}
if %24hrs = 16
{
set %HH #spc , 4
}
if %24hrs = 17
{
set %HH #spc , 5
}
if %24hrs = 18
{
set %HH #spc , 6
}
if %24hrs = 19
{
set %HH #spc , 7
}
if %24hrs = 20
{
set %HH #spc , 8
}
if %24hrs = 21
{
set %HH #spc , 9
}
if %24hrs = 22
{
set %HH 10
}
if %24hrs = 23
{
set %HH 11
}
if %24hrs = 24
{
set %HH 12
}
Also the "#spc ," is not working as I thought it would. Gonna have to figure that one out.