As for the issue, as the name suggests, a DateTime contains a date and a time. Internally, it is just a number that is an offset from a specific moment in time. If you want to represent just a date with a DateTime value then you simply set the time part to zero, i.e. midnight. When it comes to displaying a DateTime value, it's completely up to you what the output looks like. It needs to be converted to a String for display purposes so, if you want a specific format, you should convert it to a String yourself and specify the format you want, rather than leaving the conversion up to the system and assuming that it will magically know what format you want of the many possible choices. Again, it's very easy to find out how to convert a DateTime to a String in a specific format, so I'll leave that part to you.