In my application I have a Movie type and User type where any User can specify when they saw a particular movie in their logs along with ratings, etc, but I am only interested in the day not the time, so was wondering if there is only a Date type that stores only the day and nothing else, i.e. no Time.
In my application I have a Movie type and User type where any User
Share
There is not. Closest thing, if you must ensure there’s no time data attached to your
DateTimeobject, is to use theDateTime.Dateproperty, whose return value is anotherDateTime, but with the time value set to 00:00:00 (midnight).And of course, when displaying the date, you can control its formatting as you like.
In particular, the Short Date specifier:
Will output
10/14/2011in the Invariant culture.