Solved

TcxDateTime edit field does not save time to SQL, only '12:00:00 PM' after the date

Posted on 2014-04-14
4
382 Views
Last Modified: 2014-05-22
I have several TcxDateTime fields, the properties are set to Save Time and Show Time yet the Post only saves the date and time shows '12:00:00 PM'.  I have saved other dates as well but had to set the date = Now;  
Thanks for your help :)
0
Comment
Question by:Bianca
  • 2
4 Comments
 
LVL 26

Expert Comment

by:Sinisa Vuk
ID: 40000928
This is common. If you want to show date only then set DisplayFormat property.
Something like:
TcxDateTime(data.FieldByName('mydate')).Displayformat := 'yyyy.mm.dd';

Open in new window

maybe there is property to set if date or time will be shown. What kind of field is this field in database?
0
 
LVL 37

Accepted Solution

by:
Geert Gruwez earned 500 total points
ID: 40004596
it depends on how you save it to the database
saving is as important as loading

how are you loading and saving the datetime value ?
0
 

Author Comment

by:Bianca
ID: 40030583
I am using qry.Edit then qry.Post
0
 
LVL 26

Expert Comment

by:Sinisa Vuk
ID: 40030677
You want to save date or date+time?
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

773 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