Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact
A1VBCode Forums
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      

Home » .NET Programming (VB 2010 or earlier) » ASP.NET » how to count no. of days between code in...


how to count no. of days between code in...Expand / Collapse
Count no. of days between from date and to...
Poll ResultsVotes
Hi All,
 
50%
1
1.Anybody help regarding my requirements i wanted codebehind page(aspx.cs) i need to count no. of days between From date and to date which i am passing in my frontend application txtfromdate,txttodate i need to count number of days between those dates which was comming from Frontend (txtfromdate,txt
0%
0
2.After getting count of no. of days b/w From date,todate i need substract from getting days(b/w fromdate,td) to no. of leaves(employyess)after this ineed to bind to gridview control after substract value will pass to gridview control.
0%
0
Regards
 
50%
1
ANAND.
0%
0
Member Votes: 2, Anonymous Votes: 0. You don't have permission to vote within this poll.
Author
Message
Posted 7/23/2009 10:53:46 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 7/23/2009 10:45:20 AM
Posts: 1, Visits: 1
Hi All,

1.Anybody help regarding my requirements i wanted codebehind page(aspx.cs) i need to count no. of days between From date and to date which i am passing in my frontend application txtfromdate,txttodate i need to count number of days between those dates which was comming from Frontend (txtfromdate,txttodate)any code regarding this.

2.After getting count of no. of days b/w From date,todate i need substract from getting days(b/w fromdate,td) to no. of leaves(employyess)after this ineed to bind to gridview control after substract value will pass to gridview control.

Regards
ANAND.


anand

Post #27934
Posted 7/30/2009 12:58:53 PM


Forum God

Forum GodForum GodForum GodForum GodForum GodForum GodForum GodForum God

Group: Forum Members
Last Login: 9/7/2010 12:29:54 PM
Posts: 633, Visits: 1,019
Welcome to A1vbcode, ANAND!

I will say this: if you want to compare dates like this, there are several methods for comparing dates. For instance, the "compareTo" method.

The rest of your inquiry wasn't very clear, so you might have to restate.

Also, I voted for the word "Regards". I like that word.



-Mobius
Post #27968
Posted 3/25/2010 3:44:18 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/21/2010 12:38:09 AM
Posts: 1, Visits: 2
Hi,It appears you are referencing an empty viewstate(object = nothing).

Try this....

If ViewState("VarName") ISNOT Nothing THen
'Do your stuff
TextBox1.Text = ViewState("VarName").ToString()
Else
'ViewState = Nothing
'Reset your viewstate...
SCOPE: it is only good for the life of the PAGE....redirect to same page sets it to nothing
End IF

If this doesn't solve it, strip your code down and paste it in the forum and I'll see if I can help out.


mcts | a+ certification | mcp | cissp
Post #29052
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Admin, Mod, Mark, Keithuk

PermissionsExpand / Collapse

All times are GMT -5:00, Time now is 2:54pm