473,320 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how to know the month when you know the day number in a year

the day number in a year is 200
how i know the month in which this day is
Jun 20 '11 #1
2 1786
Plater
7,872 Expert 4TB
Easy Peasy.
Expand|Select|Wrap|Line Numbers
  1.  
  2. int NumberOfDays = 200;
  3.  
  4. DateTime dt = new DateTime(2011, 1, 1);
  5. dt = dt.AddDays((NumberOfDays-1));
  6.  
  7.  
Jun 20 '11 #2
Rabbit
12,516 Expert Mod 8TB
Actually, you want to add number of days minus one.
Jun 20 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: The Biscuit Eater | last post by:
Greetings from a second day newbie to php. I think I have figured out a way to explode a field in a csv file (like 11-08-03) and implode it as 031108 and then compare it to the current date(ymd)...
2
by: Michael | last post by:
Hi, I am using w2000+sp4 server with IIS running, how can I know my IIS version number, is it iis5.0 or 5.1 or 6.0? I must know this, since I want to download patches from MS web site,...
0
by: @likheri | last post by:
Hello I am facing a problem in my application. This occurs when I synchronize data from one sql server to another via internet The problem is only faced on Windows 98, ME It works perfectly on...
1
by: Johnny | last post by:
I have a database with a Master table and a Budget table. The Master table has all the data including these 4 fields (Enccredit, Encdebit, Credit and Debit) and related to the Budget table. The...
1
by: bmoos1 | last post by:
I need to make a Report of all people starting in 2004 by "Date Requested". Dates are entered as mm/dd/yyyy. I have a query that has all the people that started in 2004, but there are numerous...
11
by: John Friedland | last post by:
My problem: I need to call (from C code) an arbitrary C library function, but I don't know until runtime what the function name is, how many parameters are required, and what the parameters are. I...
3
by: LimaCharlie | last post by:
Good Day to Everyone, Need help! I have this SQL table w/ fieldname "PayPeriod". Sample value of PayPeriod are SEP06-1, SEP06-2, OCT06-1, OCT06-2... Wherein the first 3 chars is the month, 06...
2
by: buddyr | last post by:
hello, I am having trouble displaying just the month in access report field. I have tried "mmmm" and the month name displays - but also does the mmmm- I know I can write month(fieldname) - but this...
7
by: AL Engineer | last post by:
Hello All, I am using access 2007 to record the date and quantity of a product when it is staged on our production floor. I know when the first quantity is consumed when the next record is...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.