Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Adding time


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-23-2008, 06:38 PM
Junior Member
 
Join Date: Feb 2008
Location: Germany, Düsseldorf
Posts: 15
Default Adding time

Hello,

How can I add a lot of different time-values?

Example:
Day.............from.......until..........differen ce
Monday,.......08:00h - 17:00h --> 09:00h
Tuesday,......08:30h - 16:30h --> 08:00h
Wednesday,..08:00h - 17:30h --> 09:30h
--------------------------------------------
..........................................26:30h

When I use TimeParse to change TIME into TICKS, there is a problem after 24h.
Next add only adds the value to 00:00h.
__________________
Best regards / Gruß
Sascha

Last edited by Sascha K. : 03-23-2008 at 06:52 PM.
Reply With Quote
  #2 (permalink)  
Old 03-23-2008, 07:06 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 610
Default

Hello Sascha K.,

a small example:

Code:
	a = TimeParse("23:00") - TimeParse ("02:00")
	b = TimeParse("21:00") - TimeParse ("04:30")
	c = a + b
	d = c Mod cTicksPerHour
	Label1.Text = (c - d) / cTicksPerHour & ":" & d / cTicksPerMinute

specci48
Reply With Quote
  #3 (permalink)  
Old 03-23-2008, 07:30 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,956
Default

I recommend you to read the Date & Time tutorial: Date and Time
Reply With Quote
  #4 (permalink)  
Old 03-23-2008, 07:46 PM
Junior Member
 
Join Date: Feb 2008
Location: Germany, Düsseldorf
Posts: 15
Default

Ok, I´ve found a solution.

Thanks for your fast help.
__________________
Best regards / Gruß
Sascha
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Setup Builder - adding files TWELVE Questions & Help Needed 1 06-10-2008 05:55 PM
Adding calendar in runtime Cableguy Basic4ppc Wishlist 2 05-23-2008 05:23 PM
Adding Data to TreeView Nodes Woinowski Basic4ppc Wishlist 7 01-07-2008 10:32 AM
Sorted objects when adding agraham Basic4ppc Wishlist 0 11-18-2007 03:47 PM
Adding a Icon to a Control. cdeane Questions & Help Needed 1 09-29-2007 05:56 AM


All times are GMT. The time now is 11:12 PM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0