Getting first day of the month

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Sep 2006
Posts: 45
Reputation: Sarah Lee is an unknown quantity at this point 
Solved Threads: 0
Sarah Lee Sarah Lee is offline Offline
Light Poster

Getting first day of the month

 
0
  #1
Feb 5th, 2007
Hi All,

I want to set two textboxes, where I want to set the first day of current month in one textbox, and todays date in the second text box.

How can I get the first day of the current month?

Thanks In advance
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 483
Reputation: campkev is an unknown quantity at this point 
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: Getting first day of the month

 
0
  #2
Feb 5th, 2007
textBoxName.Text = DateTime.Now.Month.ToString()+"/1/"+ DateTime.Now.Year.ToString();
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 45
Reputation: Sarah Lee is an unknown quantity at this point 
Solved Threads: 0
Sarah Lee Sarah Lee is offline Offline
Light Poster

Re: Getting first day of the month

 
0
  #3
Feb 5th, 2007
I put this code, but it is showing todays' date 2/5/07 in two textboxes
Reply With Quote Quick reply to this message  
Join Date: Jul 2005
Posts: 483
Reputation: campkev is an unknown quantity at this point 
Solved Threads: 19
campkev campkev is offline Offline
Posting Pro in Training

Re: Getting first day of the month

 
0
  #4
Feb 5th, 2007
?????
post your code
Reply With Quote Quick reply to this message  
Join Date: Sep 2006
Posts: 45
Reputation: Sarah Lee is an unknown quantity at this point 
Solved Threads: 0
Sarah Lee Sarah Lee is offline Offline
Light Poster

Re: Getting first day of the month

 
0
  #5
Feb 5th, 2007
I am sorry, I got it worked.
I misplaced the code.
Really sorry for that
Thanks

I was trying the same thing for another control also, infragistics webdatechooser,
In that, it was not working
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC