Solved

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

Posted on 2014-04-14
4
388 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

861 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