Click here to Skip to main content
15,897,518 members
Home / Discussions / C#
   

C#

 
GeneralRe: What is the return value of the insert and delete sql statement Pin
Palash Biswas3-Feb-10 19:54
Palash Biswas3-Feb-10 19:54 
GeneralRe: What is the return value of the insert and delete sql statement Pin
Zar Ni3-Feb-10 20:11
Zar Ni3-Feb-10 20:11 
GeneralRe: What is the return value of the insert and delete sql statement Pin
Zar Ni3-Feb-10 20:19
Zar Ni3-Feb-10 20:19 
GeneralRe: What is the return value of the insert and delete sql statement Pin
Palash Biswas3-Feb-10 20:27
Palash Biswas3-Feb-10 20:27 
GeneralRe: What is the return value of the insert and delete sql statement Pin
Zar Ni3-Feb-10 20:29
Zar Ni3-Feb-10 20:29 
Questiontransparent control and zorder problem Pin
fireghosthk3-Feb-10 16:38
fireghosthk3-Feb-10 16:38 
QuestionAdd months and set the last day of the month in one step Pin
sri_34643-Feb-10 15:22
sri_34643-Feb-10 15:22 
AnswerRe: Add months and set the last day of the month in one step [modified] Pin
Luc Pattyn3-Feb-10 15:39
sitebuilderLuc Pattyn3-Feb-10 15:39 
Hi,

from year and month:
DateTime dt=new DateTime(year, month, 1).AddMonths(monthsToAdd+1).AddDays(-1);


or from DateTime:
dt=dt.AddMonths(monthToAdd+1).AddDays(-dt.Day);               // incorrect at end of month
dt=dt.AddDays(1-dt.Day).AddMonths(monthToAdd+1).AddDays(-1);  // fixed

Smile | :)

Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

I only read code that is properly formatted, adding PRE tags is the easiest way to obtain that.
[The QA section does it automatically now, I hope we soon get it on regular forums as well]


modified on Wednesday, February 3, 2010 10:08 PM

GeneralRe: Add months and set the last day of the month in one step Pin
sri_34643-Feb-10 16:50
sri_34643-Feb-10 16:50 
GeneralRe: Add months and set the last day of the month in one step Pin
Luc Pattyn3-Feb-10 17:01
sitebuilderLuc Pattyn3-Feb-10 17:01 
AnswerRe: Add months and set the last day of the month in one step Pin
Luc Pattyn3-Feb-10 16:11
sitebuilderLuc Pattyn3-Feb-10 16:11 
Questionrename listbox item Pin
kennyhibs3-Feb-10 12:40
kennyhibs3-Feb-10 12:40 
AnswerRe: rename listbox item Pin
Luc Pattyn3-Feb-10 12:57
sitebuilderLuc Pattyn3-Feb-10 12:57 
GeneralRe: rename listbox item Pin
kennyhibs3-Feb-10 18:21
kennyhibs3-Feb-10 18:21 
GeneralRe: rename listbox item Pin
Luc Pattyn3-Feb-10 23:58
sitebuilderLuc Pattyn3-Feb-10 23:58 
AnswerRe: rename listbox item Pin
ScottM13-Feb-10 21:25
ScottM13-Feb-10 21:25 
Questionmanaged code that will do the same as SetForegroundWindow Pin
kevinnicol3-Feb-10 8:10
kevinnicol3-Feb-10 8:10 
AnswerRe: managed code that will do the same as SetForegroundWindow Pin
DaveyM693-Feb-10 8:22
professionalDaveyM693-Feb-10 8:22 
GeneralRe: managed code that will do the same as SetForegroundWindow Pin
kevinnicol3-Feb-10 8:38
kevinnicol3-Feb-10 8:38 
QuestionMessage Removed Pin
3-Feb-10 7:08
attalurisubbu3-Feb-10 7:08 
AnswerRe: Need to display the page number as "2" from second page Onwards. Pin
Not Active3-Feb-10 7:37
mentorNot Active3-Feb-10 7:37 
Questiontrying to understand classes and threads using the progress bar in c# Pin
tonyonlinux3-Feb-10 6:15
tonyonlinux3-Feb-10 6:15 
AnswerRe: trying to understand classes and threads using the progress bar in c# Pin
Luc Pattyn3-Feb-10 6:28
sitebuilderLuc Pattyn3-Feb-10 6:28 
GeneralRe: trying to understand classes and threads using the progress bar in c# Pin
Not Active3-Feb-10 6:33
mentorNot Active3-Feb-10 6:33 
GeneralRe: trying to understand classes and threads using the progress bar in c# Pin
Luc Pattyn3-Feb-10 6:42
sitebuilderLuc Pattyn3-Feb-10 6:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.