Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 12 hour clock instead of 24?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
commandos




PostPosted: Sat May 10, 2008 10:33 am   Post subject: 12 hour clock instead of 24?

I've been trying to make an alarm clock and I want it to be in a 12 hour clock instead of 24. Is there anyway that I can get the hour, minute and seconds separately so i can have a variable for each?
Sponsor
Sponsor
Sponsor
sponsor
gitoxa




PostPosted: Sat May 10, 2008 12:41 pm   Post subject: RE:12 hour clock instead of 24?

The time function puts the time into a string variable, just use string manipulation to take out each part of the time.
commandos




PostPosted: Sun May 11, 2008 12:02 pm   Post subject: RE:12 hour clock instead of 24?

haha, ya i took computer science 2 years ago and im just doing a little project on my own right now. Completely forgot you can get certain parts of the string. Thanks, i got it now.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: