2
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by vinaysrk919
0

>how i can show only current date excluding time in any textbox...

Use ToShortDateString(), ToString("foramt") methods.

>and how i found the difference of the date in asp.net

Use TimeSpan type.

TimeSpan ts= date1 - date2;
0

>how i can show only current date excluding time in any textbox...

Use ToShortDateString(), ToString("foramt") methods.

>and how i found the difference of the date in asp.net

Use TimeSpan type.

TimeSpan ts= date1 - date2;

thanks for reply....
but should i take the datatype of date1 and date2

0

>how i can show only current date excluding time in any textbox...

Use ToShortDateString(), ToString("foramt") methods.

>and how i found the difference of the date in asp.net

Use TimeSpan type.

TimeSpan ts= date1 - date2;

thanks for reply....
but what should i take the datatype of date1 and date2

0

>how i can show only current date excluding time in any textbox...

Use ToShortDateString(), ToString("foramt") methods.

>and how i found the difference of the date in asp.net

Use TimeSpan type.

TimeSpan ts= date1 - date2;

i having the code...

TimeSpan date1 = TimeSpan.Parse(TextBox1.Text);
TimeSpan date2 = TimeSpan.Parse(TextBox2.Text);
TimeSpan ts = date1 - date2;
Textbox3.Text=ts;

Textbox1 show the current date,
Textbox2 show the previous date,
and
Textbox3 show the difference of textbox1 and textbox2 as the above given code..

i'm gettin an error (input string not correct format)
any solution .....for the above

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.