Hi

This was discussed recently with a lot of in-depth comment. The best thing
to do is to search the delphi-en past messages but the essence of the
discussions was that the DateTime format is the time from some date in the
past as a floating point number of days. Time is the fraction eg noon = 0.5.
Therefore you can trunc the DateTime to make an integer and then subtract.
There was also a discussion on the various library functions available. The
thread was good and well worth reading.


Bobby Clarke



  -----Original Message-----
  From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of Adrian Bunyi
  Sent: 24 October 2005 16:21
  To: [email protected]
  Subject: RE: [delphi-en] RE: Ädelphi-enÅ Differences days between two
dates


  Use the function: StrToDate with format parameter:
  StrToDate(const S:string;const
  FormatSettings:TFormatSettings)
  Use formatsettings for your yyyy/MM/dd day format.

  Regards,
  Adrian

  From: [email protected]
  [mailto:[EMAIL PROTECTED] On Behalf
  Of soonhuat ong
  Sent: 24 October 2005 10:52
  To: [email protected]
  Subject: Ädelphi-enÅ Differences days between two
  dates



  Hi,



  I have 2 strings as following:

  str1 := '2005/10/28';
  str2 := '2005/11/03';

  Now i want to calculate the differents days in between
  those two
  strings(after convert it to TDateTime type), any idea
  ?

  P/S : The Datetime is in yyyy/MM/dd format



  Thx in advance




  Cordialement,
  Adrian BUNYI








___________________________________________________________________________
  Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
  Téléchargez cette version sur http://fr.messenger.yahoo.com


  -----------------------------------------------------
  Home page: http://groups.yahoo.com/group/delphi-en/
  To unsubscribe: [EMAIL PROTECTED]



----------------------------------------------------------------------------
--
  YAHOO! GROUPS LINKS

    a..  Visit your group "delphi-en" on the web.

    b..  To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

    c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.


----------------------------------------------------------------------------
--




[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/i7folB/TM
--------------------------------------------------------------------~-> 

-----------------------------------------------------
Home page: http://groups.yahoo.com/group/delphi-en/
To unsubscribe: [EMAIL PROTECTED] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/delphi-en/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to