Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

d1 to d3 TDateTime incompatability

Posted on 1998-04-10
3
Medium Priority
?
315 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 120 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

597 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