|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datetimepicker - just getting the data partHi,
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() Aussie Rules wrote: Show quoteHide quote > 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 Hi,
The value still contains the time component sDt = dtStartDate.Value sDt.ToShortDateString() Thanks Show quoteHide quote "Izzy" <israel.rich***@gmail.com> wrote in message news:1159909908.774342.188350@e3g2000cwe.googlegroups.com... > 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() > > > Aussie Rules wrote: >> 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 > How are you determining there is a time component?
Dim dtDate As Date = Now dtDate.ToShortDateString() This returns "10/3/2006". Izzy Aussie Rules wrote: Show quoteHide quote > Hi, > > The value still contains the time component > > sDt = dtStartDate.Value > sDt.ToShortDateString() > > > Thanks > "Izzy" <israel.rich***@gmail.com> wrote in message > news:1159909908.774342.188350@e3g2000cwe.googlegroups.com... > > 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() > > > > > > Aussie Rules wrote: > >> 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 > > 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 Show quoteHide quote "Aussie Rules" <AussieRules@nospam.nospam> schreef in bericht news:OWrszzz5GHA.5072@TK2MSFTNGP05.phx.gbl... > Hi, > > The value still contains the time component > > sDt = dtStartDate.Value > sDt.ToShortDateString() > > > Thanks > "Izzy" <israel.rich***@gmail.com> wrote in message > news:1159909908.774342.188350@e3g2000cwe.googlegroups.com... >> 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() >> >> >> Aussie Rules wrote: >>> 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 >> > > MyDate = Format(DTPicker1.Value, "Short Date")
On Tue, 3 Oct 2006 21:56:42 +0100, "Aussie Rules" <AussieRules@nospam.nospam> wrote: Show quoteHide quote >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 >
Sending email with attachments
writing commands to command prompt in VB.NET Data Set to Excel ? vb.net serial IO problem Open folders to process files automatically [Newbie] Customize Anchor properties ? SelectedIndexChanged causes selectedindex to reset to -1? ComboBox.Items.Clear() How hard would this be? Q: Activated |
|||||||||||||||||||||||