Solved

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

Posted on 2014-04-14
4
400 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
[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
  • 2
4 Comments
 
LVL 27

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 27

Expert Comment

by:Sinisa Vuk
ID: 40030677
You want to save date or date+time?
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

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…
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

696 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