Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Converting date on Tsearchrec.

Posted on 1998-02-11
2
Medium Priority
?
420 Views
Last Modified: 2010-04-04
Hi,
 
     I can't seem to find a simple way to extract the date from TSearchrec.date. In other words, the date is returned as a large number, and the normal date conversion functions don't seem to work with this. There must be a simple solution to this that I am overlooking?  I simply want to be able to put it in a caption in a date format (10/26/97 for example).
          Thanks a bunch.
0
Comment
Question by:jexd99
[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 Comments
 
LVL 2

Accepted Solution

by:
Waldek earned 150 total points
ID: 1359035
You may try this. You have a FileName and use this construction, where Result is type System.TDateTime. See Borland Example FilManex in demos
 Result := FileDateToDateTime(FileAge(FileName));

0
 

Author Comment

by:jexd99
ID: 1359036
Waldek,

   This got me in pointed in the right direction.  I ended up doing exactly as specified, and then put that in a datetostr function so I could place it in a caption.  It seems like their must be a better solution than using 3 functions to accomplish this, but the important thing is that it works. :)    
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

670 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