Click here to Skip to main content
16,004,924 members
Home / Discussions / C#
   

C#

 
QuestionWinform Connection String Problem Pin
DEWright_CA1-Jun-06 10:08
DEWright_CA1-Jun-06 10:08 
QuestionWhat component suite gives value for money? [modified] Pin
_awatts1-Jun-06 10:01
_awatts1-Jun-06 10:01 
QuestionNo Windows Login Prompt Required. Pin
HillyBilly0691-Jun-06 9:32
HillyBilly0691-Jun-06 9:32 
AnswerRe: No Windows Login Prompt Required. Pin
Alex B. Clarke1-Jun-06 11:53
Alex B. Clarke1-Jun-06 11:53 
GeneralRe: No Windows Login Prompt Required. Pin
HillyBilly0695-Jun-06 3:43
HillyBilly0695-Jun-06 3:43 
GeneralRe: No Windows Login Prompt Required. [modified] Pin
Alex B. Clarke6-Jun-06 8:03
Alex B. Clarke6-Jun-06 8:03 
QuestionIs there a simple way to convert date formats using dateinfoproviders??? Pin
LongRange.Shooter1-Jun-06 9:15
LongRange.Shooter1-Jun-06 9:15 
AnswerRe: Is there a simple way to convert date formats using dateinfoproviders??? Pin
Stephan Samuel1-Jun-06 9:28
Stephan Samuel1-Jun-06 9:28 
I don't think Gregorian has anything to do with this.

Try this:

<br />
<br />
int myDate = 06120;  // date in YYDDD format<br />
<br />
// get year and day separated<br />
<br />
int myYear = myDate / 1000;<br />
int myDay = myDate % 1000;<br />
<br />
// form a DateTime<br />
<br />
DateTime temp = new DateTime(myYear, 1, 1);  // use year, month, day<br />
DateTime myResult = temp.AddDays(myDay).Date;  // get the date<br />
<br />


myResult will contain a valid DateTime object that should have your value.

You may be able to combine some steps and do this all inline. I broke it out to demonstrate the method. If you do munge, make sure to watch out for casting.


Stephan
GeneralRe: Is there a simple way to convert date formats using dateinfoproviders??? Pin
User 66581-Jun-06 9:39
User 66581-Jun-06 9:39 
AnswerRe: Is there a simple way to convert date formats using dateinfoproviders??? Pin
User 66581-Jun-06 9:37
User 66581-Jun-06 9:37 
Questionasymetric property accessibility? Pin
eye_for_an_eye1-Jun-06 8:45
eye_for_an_eye1-Jun-06 8:45 
AnswerRe: asymetric property accessibility? Pin
Stephan Samuel1-Jun-06 9:01
Stephan Samuel1-Jun-06 9:01 
QuestionUsing the results found by google desktop Pin
Rizwan Rathore1-Jun-06 7:27
Rizwan Rathore1-Jun-06 7:27 
AnswerRe: Using the results found by google desktop Pin
zhangyang20081-Jun-06 19:01
zhangyang20081-Jun-06 19:01 
GeneralRe: Using the results found by google desktop Pin
Rizwan Rathore2-Jun-06 2:54
Rizwan Rathore2-Jun-06 2:54 
QuestionConsuming Java Web Service from C# client Pin
acvishy1-Jun-06 7:24
acvishy1-Jun-06 7:24 
QuestionRecord change detection. Pin
tcss1-Jun-06 7:21
tcss1-Jun-06 7:21 
QuestionWindows Vista and Audio/Video functions Pin
[DK]KiloDunse1-Jun-06 6:53
[DK]KiloDunse1-Jun-06 6:53 
AnswerRe: Windows Vista and Audio/Video functions Pin
Judah Gabriel Himango1-Jun-06 9:15
sponsorJudah Gabriel Himango1-Jun-06 9:15 
GeneralRe: Windows Vista and Audio/Video functions Pin
LongRange.Shooter1-Jun-06 9:21
LongRange.Shooter1-Jun-06 9:21 
GeneralRe: Windows Vista and Audio/Video functions Pin
Judah Gabriel Himango1-Jun-06 9:53
sponsorJudah Gabriel Himango1-Jun-06 9:53 
AnswerRe: Windows Vista and Audio/Video functions [modified] Pin
LongRange.Shooter1-Jun-06 9:17
LongRange.Shooter1-Jun-06 9:17 
QuestionEquivalent of a break Pin
donkaiser1-Jun-06 4:42
donkaiser1-Jun-06 4:42 
AnswerRe: Equivalent of a break Pin
stancrm1-Jun-06 4:49
stancrm1-Jun-06 4:49 
AnswerRe: Equivalent of a break Pin
Stephan Samuel1-Jun-06 6:26
Stephan Samuel1-Jun-06 6:26 

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.