TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ic ic
NA
85
0
Week Number of day, like VB Function DATEPART
Nov 13 2009 6:14 AM
Hi, I need help.
I need to get the week number of day,
like the VB Function: [code] DATEPART("ww", Now()) [/code]
I tried this but it does not calculate correctly as when the 1st is on Saterday (week1) & calculates on the 3rd Monday
the below code sees it as still part of week1 & not week 2
[code]
WeekOfYear = Convert.ToString(Math.Ceiling(Convert.ToDouble(ManufactureDateVar.DayOfYear) / 7));
[/code]
I need to somehow replicate the VB Function in C# to the correct week number
Please Assist!
Reply
Answers (
3
)
recursion
DatagridView Button Column Cell Editing Control Width.