Re: Using arrays to display a date.

Tech-Archive recommends: Fix windows errors by optimizing your registry



You really don't need an array to do this, I'm assuming 1 would be Jan 1st
of the current year and 365 would be dec. 31st of the current year:

DateTime startDate = DateTime.Parse("01/01/" +
DateTime.Now.Year.ToString()); //Get the first of the current year
int daysToAdd = int.Parse(textBox1.Text) - 1; //this will allow for 1 to
give you 1/1/2005
DateTime newDate = startDate.AddDays(daysToAdd);
MessageBox.Show(newDate.ToString());

--
Thanks
Wayne Sepega
Jacksonville, Fl

Enterprise Library Configuration Console Module Generator
http://workspaces.gotdotnet.com/elccmg

"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein

"Vikas Arya" <aryavikas@xxxxxxxxxxx(donotspam)> wrote in message
news:43A8D541-E7AF-4090-B2D8-7F8FD37C6E7D@xxxxxxxxxxxxxxxx
> Hi.
>
> Any suggestions on how I might build a form which allows my user to enter
a
> number from 1-365 and return a date in the 'mm/dd' format?
>
> I would like to use an array to do this. Thanks.
> --
> Thanks,
>
> Vikas Arya


.



Relevant Pages

  • AudioVox 6600 and 2005
    ... Jacksonville, Fl ... Enterprise Library Configuration Console Module Generator ...
    (microsoft.public.pocketpc)
  • Re: # of physiclal CPUs
    ... > Enterprise Library Configuration Console Module Generator ...
    (microsoft.public.windowsxp.hardware)
  • Re: Ipaq 3970 wipe out
    ... Enterprise Library Configuration Console Module Generator ...
    (microsoft.public.pocketpc)
  • Re: Best AIM client?
    ... Wayne Sepega ... Jacksonville, Fl ... Enterprise Library Configuration Console Module Generator ...
    (microsoft.public.pocketpc)
  • Re: RDP and Media Center
    ... >> Enterprise Library Configuration Console Module Generator ...
    (microsoft.public.windows.mediacenter)