Those functions are visual basic functions - and although you might be able
to use them from C#, a better way would be something like:
DateTime time1 = Convert.ToDateTime( startTimeTextBox.Text );
DateTime time2 = Convert.ToDateTime( endTimeTextBox.Text );
if ( time1 < time2 )
Note: I didn't consult the API when writing this - so check out the
functions yourself ( which I would recommend you do anyway to get familiar
with them ).
Pete
"DraguVaso" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> microsoft.VisualBasic.DateDiff
>
> Although I didn't need to set it in my project?
>
>
> <(E-Mail Removed)> wrote in message news:c21m3c$1ocdnj$(E-Mail Removed)...
> > thx!
> >
> > but I can't find any DateDiff function in the .NET framework.
> > from wich namespace is DateDiff ???
> >
> > regards,
> >
> >
> > gicio
> >
> >
> >
> >
> > "DraguVaso" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > use this function:
> > > DateDiff(DateInterval.Minute, CDate(startTimeTextBox.Text ),
> > > CDate(endTimeTextBox.Text))
> > >
> > >
> > > <(E-Mail Removed)> wrote in message
> news:c21kpt$1nvt1r$(E-Mail Removed)...
> > > > I have two text boxes;
> > > >
> > > > startTimeTextBox.Text = "08:00";
> > > > endTimeTextBox.Text = "15:00";
> > > >
> > > > and now I will check if startTimeTextBox.Text starts
> > > > really before endTimeTextBox.Text
> > > >
> > > > something like this:
> > > >
> > > >
> > > > bool timeIsOk = (startTimeTextBox.Text < endTimeTextBox.Text);
> > > >
> > > >
> > > > but how to do it real?
> > > >
> > > >
> > > >
> > > > regards,
> > > >
> > > > gicio
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|