Solved

Storing date and time value into Paradox table date field

Posted on 2003-12-06
1
578 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
[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
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
control image tags in a string ? 12 153
how can i search if string exist in array ? 3 69
Graphics32 under Delphi 10.1 Berlin 2 128
Delphi: sending SMS on android platform 1 67
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…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 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