Solved

d1 to d3 TDateTime incompatability

Posted on 1998-04-10
3
307 Views
Last Modified: 2010-04-06
Various information I have found says that in order to convert a d1 date to a d3 date I need to subtract 693594.0. However, when I look at a databse reated with d1 it appears fine with d3. If I need to convert the datefields when should I do this?

Thanks, Tom.
0
Comment
Question by:tomcorcoran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
pjdb earned 30 total points
ID: 1361387
If your database is conventional (say dBase, Paradox, Access or so) it's normal since the driver of the database convert the date from your code (Delphi format) to the standard format of the database. I think you can share such database without anay trouble between Delphi versions.
However, you can have troubles if you want to compare in you code a date to a reference date (for validation for example) and you just recompile the code. In this case you have to correct the reference values by 693594.
Except this kind of case, i don't see why there would be trouble with the new format.

JDB
0
 

Author Comment

by:tomcorcoran
ID: 1361388
JDB,

Could you elaborate on what you mean by compariong to a reference date - thanks,

Tom.
0
 
LVL 1

Expert Comment

by:pjdb
ID: 1361389
For example you may want to verify that the date the user have put is after a reference date to ensure that there is no mistake. for example :
if userdate<358998 then {<-this line must be different from version to version}
{error message}
else
{ok}
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question