Solved

Storing date and time value into Paradox table date field

Posted on 2003-12-06
1
524 Views
Last Modified: 2010-04-05
I have a Paradox 7 table that contains a "Timestamp" type field.  I wish to store a date AND TIME into this one Paradox field.  The date/time is formatted in a string value such as "11/08/2003 11:23:98 AM".  How do I get this string into the Paradox field?
0
Comment
Question by:Kapusta
1 Comment
 
LVL 22

Accepted Solution

by:
Ferruccio Accalai earned 50 total points
ID: 9890298
from delphi help:
Use AsDateTime to read the value of the field’s data into an object or variable of type TDateTime, or to assign a TDateTime value to the contents of the field. TField does not support TDateTime values, and raises an exception when an attempt is made to get or set the AsDateTime property.

Descendants of TField that represent datetime (timestamp) fields or that support conversions between the field’s Value property and a TDateTime value, override AsDateTime to read and write the value of the field as a TDateTime value.

Table1.FieldByName('TimeStamp').AsDateTime := StrToDateTime('11/08/2003 11:23:98 AM');
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

25 Experts available now in Live!

Get 1:1 Help Now