It look alright, but Ill normally stick in brackets just to be sure
If (time > day_start) and (time < day_end)
My brain melted tonight.
For the life of me, I can't figure out how to do the time function.
I need to set the day_status to "on" or "off" depending on the time of day.
dim day_start as string
dim day_end as string
day_start = "7:00 AM"
day_end = "6:30 PM"
If time > day_start and time < day_end
day_status = true
else
day_status = false
end if
Something seems wrong here. What am I doing wrong?
- Lwin M. Maung
If it's stuck, force it. If it breaks it needed replacing anyway
It look alright, but Ill normally stick in brackets just to be sure
If (time > day_start) and (time < day_end)
I got it. Brain fart tonight.
I have to seperate it in 2
From (morning to noon) or (noon to evening) did the trick.![]()
- Lwin M. Maung
If it's stuck, force it. If it breaks it needed replacing anyway
If (Time > Day_Start) And (Time < "11:59 AM") Or (Time > "12:00 PM") And (Time < Day_End) Then
Status_day = True
Else
Status_day = False
End If
This did the trick
- Lwin M. Maung
If it's stuck, force it. If it breaks it needed replacing anyway
The first code should be fine...it must have got cofused with the AM and PM. The 24 hours format should work![]()
Why did I not think of that? 24 hour format!!!! AH!!!! I just got the mute/unmute feature.
Thanks for the help.
- Lwin M. Maung
If it's stuck, force it. If it breaks it needed replacing anyway
Too much party perhaps...my brain is already aching from coding this little PIC microcontroller.
I wish I can code big apps![]()
Year and a half in college
I WISH I COULD CODE ANYTHING ! ! !
Current Status: For Sale
Specs
- 1.5Ghz Toshiba Laptop (available - no screen)
- Indash Motorized 7" VGA TS
- DeLorme GPS (sold)
- Power Inverter (sold)
- Pioneer HU (sold)
Shouldn't have picked a managment college.Originally Posted by carabuser
they don't teach much programming there. Just kidding, couldn't resist.
2006 Chevy Colorado: VIA M10000 EDEN, 1 GB RAM, 80 GB 2.5" Seagate HDD, USB Slim Slot DVD/RW, Holux GPS, MobileVU 10.4" LCD (touch not working yet), VOOMPC Case (blue), 70W DC-DC supply.
I am a network admin/database admin. I hate to code (for a living). I do code at work but nothing big. Normally scripts and such. My attention span is shorter than that of a fruit fly so I can not sit still.
What did 5 years of college teach me? Not much at all that is useful in my day to day work. I am enjoying the interface coding though. This is kind of a break from things I do. Relaxes me.
- Lwin M. Maung
If it's stuck, force it. If it breaks it needed replacing anyway
Bookmarks