[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 405
  • Last Modified:

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

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
Bianca
Asked:
Bianca
  • 2
1 Solution
 
Sinisa VukCommented:
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
 
Geert GruwezOracle dbaCommented:
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
 
BiancaAuthor Commented:
I am using qry.Edit then qry.Post
0
 
Sinisa VukCommented:
You want to save date or date+time?
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now