Solved

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

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

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 36

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 25

Expert Comment

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

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…
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 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

15 Experts available now in Live!

Get 1:1 Help Now