Solved

Converting date on Tsearchrec.

Posted on 1998-02-11
2
405 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
2 Comments
 
LVL 2

Accepted Solution

by:
Waldek earned 50 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now