Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

How can i compare 2 Dates

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-04-2007, 07:30 PM
Junior Member
 
Join Date: Apr 2007
Location: Germany - Hessen
Posts: 26
Default How can i compare 2 Dates

How can I compare two date values? I would like to determine and store the greatest value.
Reply With Quote
  #2 (permalink)  
Old 05-04-2007, 07:46 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,344
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Hi,

First You have to convert the date back to ticks:

T = DateParse ("01/30/2012")

Then compare both results, the newer date will be the greater
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)

My Posts helped you? Consider Buying me a Porto Glass!
Reply With Quote
  #3 (permalink)  
Old 05-04-2007, 07:49 PM
RandomCoder's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire, UK
Posts: 623
Awards Showcase
Beta Tester 
Total Awards: 1
Default

You first need to convert to the tick value of the date and then determine which is greater. See quote of B4PCC help file below.

Quote:
Returns the ticks value of a date string.
The date string must be formatted exactly as the date format. (Default "mm/dd/yyyy")
Syntax: DateParse (Date String)
Example:
T = DateParse ("01/30/2012")
Looks like CableGuy got in first ;-p

Regards,
RandomCoder
Reply With Quote
  #4 (permalink)  
Old 05-04-2007, 09:37 PM
Junior Member
 
Join Date: Apr 2007
Location: Germany - Hessen
Posts: 26
Default

Thanks for the fast answer. It works fantastically.

Greeting

Fontanus
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
help with dates adbftrainer Questions (Windows Mobile) 3 08-31-2008 05:56 PM
How many days between two dates pmu5757 Questions (Windows Mobile) 3 09-21-2007 10:27 AM
How I have compare date? epatrik Questions (Windows Mobile) 4 09-20-2007 09:54 AM
Difference Between Two Dates dvanwig Questions (Windows Mobile) 7 08-02-2007 04:29 AM
Can we compare imagelist items? Cableguy Questions (Windows Mobile) 1 06-02-2007 05:03 PM


All times are GMT. The time now is 11:09 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0