Datetimepicker - just getting the data part

  • Thread starter Thread starter Aussie Rules
  • Start date Start date
A

Aussie Rules

Hi,

I have a date time picker on a form, and it returns the date, but inclused a
time value as well.

How can I just get the date part with the time being 00:00

Thanks
 
Does "00:00" represent a time format? Or do you want just the date
returned and no time.

If so, try it this way:

Dim dtDate As DateTime = Now
dtDate.ToShortDateString()
 
Hi,

The value still contains the time component

sDt = dtStartDate.Value
sDt.ToShortDateString()


Thanks
 
How are you determining there is a time component?

Dim dtDate As Date = Now
dtDate.ToShortDateString()

This returns "10/3/2006".

Izzy
 
Aussie,
The value still contains the time component

The DateTime structure holds not any Date or Time. It are ticks in the
"long" property Ticks starting at the first day of the year one, confirm
your timezone, which can be represented in all kind of ways.

I hope this gives an idea.

Cor
 
Back
Top