473,403 Members | 2,284 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,403 software developers and data experts.

how to get; number of days in a given month

2 968

"Ivan Jericevich" <iv**@oberon.co.zawrote in message
news:ez**************@TK2MSFTNGP06.phx.gbl...
>
Dim dt As Date = #2/5/2006#
Console.WriteLine("Days In Month = {0}", _
DateTime.DaysInMonth(dt.Year, dt.Month))

gives you 28

Robin S.
Dec 27 '06 #2
The .net framework data object supplies this functionality

Look at System.Date


"Ivan Jericevich" <iv**@oberon.co.zawrote in message
news:ez**************@TK2MSFTNGP06.phx.gbl...
>
Jan 1 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matt Karp | last post by:
DECLARE @varDate datetime DECLARE @varMonthDate datetime DECLARE @varYear datetime DECLARE @varFOM varchar(10) DECLARE @NumDaysInMonth as int select @varDate = '2/1/2004' select...
3
by: David | last post by:
I'm new to DB2 and I need to write a query that will allow me to find specific dates instead of me having a date range asked for, I want it to be calculated. I've done this in Access by coding...
6
by: carl.barrett | last post by:
Hi, I have a continuous form based on a query ( I will also be creating a report based on the same query). There are 2 fields: Date Obtained and Date Of Expiry I want a further 3 columns...
4
by: Ronald Celis | last post by:
Hi, is there anyway to get the Number of days in a given month and Year in C# thanks Ronald Celis
16
by: Atley | last post by:
I am trying to get a overall difference on two dates, I can get the difference in Years, Months, Weeks, Days, Hours, Minutes, Seconds, no problems... What I cannot seem to figure out is how to...
29
by: james | last post by:
I have a problem that at first glance seems not that hard to figure out. But, so far, the answer has escaped me. I have an old database file that has the date(s) stored in it as number of days. An...
0
by: georges the man | last post by:
The purpose: • Sorting and Searching • Numerical Analysis Design Specification You are to write a program called “StockAnalyser”. Your program will read a text file that contains historical...
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...
5
by: Mike | last post by:
I use c#, V2005 How I can get difference between two dates and get value in month(s) I had found some solutions but it is not exactly what I need. private static int...
2
rsrinivasan
by: rsrinivasan | last post by:
Hi all, Is SQLSERVER have any built in function to get number of days for a given month? Thanks,
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.