Clock

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
greylegface
Posts: 2
Joined: Mon Dec 04, 2006 1:48 pm

Clock

Post by greylegface »

ive got a 24 hours clock working to simulate day after day, and ive got an AM/PM marker to work but, this is where i get stuck, the AM/PM only comes into effect after the 12 hours.....0 - 12 AM, 13 - 24 PM, and i need to get these to work with a 12 hour clock only and dont know where to start basically, I thought it would let me do that but im struggling with the coding as im new to this software, would i start from negatives and do the PM after 0? im not sure....

any help would be much appreciated, as my head is hurting and i think my last braincell is giving up!!! LOL

thanks

grey

Mark
Posts: 209
Joined: Thu Oct 19, 2006 11:46 am
Location: Bakewell, UK
Has thanked: 20 times
Been thanked: 16 times

Post by Mark »

I am not sure what the problem actually is, however, what I might do is to set up a 0 to 24 hour clock and when I print out the time (say on an LCD) the simply subtract 12 from the hours if hours is greater than 12.

So decision diamond : If Hrs>12 if Yes then Hrs = Hrs - 12 if no then do nothing. Yes and No are the lines that split off from the diamond.

The same decision can be used to add a marker for am or pm.

hope this helps
Go with the Flow.

Post Reply