Reputation: 2429
I used dateEdit field to store date in my form. In Access Database it store as "07-01-2014" but When I try to retrieve it back to dateEdit field, it displaying "07-01-2014 AM 12:00:00". I dont need time. How to remove this time from dateEdit Field.
Upvotes: 0
Views: 424
Reputation: 2429
Finally I solved that by simple changing DateTime datatype to string in both C# and MS-Access database. Now am getting Date only.
Upvotes: 0
Reputation: 123409
According to this thread in the DevExpress support forum the solution would be to set the DateEdit.Properties.Mask.UseMaskAsDisplayFormat
property to True
. For more information see
MaskProperties.UseMaskAsDisplayFormat Property
Upvotes: 2
Reputation: 45
For retrieve only date:
DateTime retDate= *retrieved date*;
string onlyDate = retDate.ToString("MM/dd/yyyy");
Upvotes: 1