Korzh.com developer tools forums :: View topic - Time showing for date fields
Korzh.com
home : Community forums  FAQFAQ   SearchSearch  |  RegisterRegister  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Time showing for date fields

 
Post new topic   Reply to topic    Korzh.com developer tools Forum Index -> EasyQuery ASP.NET
View previous topic :: View next topic  
Author Message
mday
Novice


Joined: 19 Oct 2011
Posts: 4

PostPosted: Wed Oct 19, 2011 4:12 am    Post subject: Time showing for date fields Reply with quote

Date fields are being formated to display the date and time when displaying the results and in the where clause. How do I get the dates to display only?
Back to top
View user's profile Send private message
Admin
Site Admin


Joined: 07 Nov 2005
Posts: 272

PostPosted: Mon Oct 31, 2011 3:35 pm    Post subject: Reply with quote

Select "date" data type for your attribute in the model instead of "date/time"
Back to top
View user's profile Send private message
mday
Novice


Joined: 19 Oct 2011
Posts: 4

PostPosted: Wed Nov 02, 2011 10:22 pm    Post subject: Reply with quote

The fields in the database are of type "Date" but are being displayed in the results table with a time. The time being set to "00:00:00". Is there somewhere where I can format the display of these dates to not include the time and in a format of my choice instead of mm/dd/yyyy? It looks strange for some fields like 'dateOfBirth' to contain a time. The same date fields are being used in the where clause and show no times.
Back to top
View user's profile Send private message
Admin
Site Admin


Joined: 07 Nov 2005
Posts: 272

PostPosted: Wed Nov 09, 2011 1:29 pm    Post subject: Reply with quote

It happens because they have date/time type in your database.

I think there must be some properties in DataGrid component (or any other control you use to show the result of the query) which allows you to change the formats of the shown data.
Back to top
View user's profile Send private message
mday
Novice


Joined: 19 Oct 2011
Posts: 4

PostPosted: Wed Nov 09, 2011 7:34 pm    Post subject: Reply with quote

Thanks for your reply. I managed to format the dates for the grid control.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Korzh.com developer tools Forum Index -> EasyQuery ASP.NET All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group