Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Calendar
  New Posts New Posts RSS Feed - Retrieve WeekNumer from control?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Retrieve WeekNumer from control?

 Post Reply Post Reply
Author
Message
celebre View Drop Down
Newbie
Newbie


Joined: 11 July 2006
Location: Spain
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote celebre Quote  Post ReplyReply Direct Link To This Post Topic: Retrieve WeekNumer from control?
    Posted: 24 October 2006 at 9:40am
My application prints events given a week number, but it will depend of the DatePicker.FirstWeekOfYearDays value.
I can code a function to read that property and calculate the week number... but If the control calculated it previosly I think that is redundant.
 
Can I retrive the weeknumber from the control directly? Can't find any method in the help.
 
Greetings
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2006 at 5:02pm
No, you can't.  Use the folowing simple formula:

WeekNumber = ((LastWeekDay.Date - (DatePicker.FirstWeekOfYearDays - 1)).DayOfYear - 1) / 7 + 1


--
WBR,
Serge
Back to Top
celebre View Drop Down
Newbie
Newbie


Joined: 11 July 2006
Location: Spain
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote celebre Quote  Post ReplyReply Direct Link To This Post Posted: 24 October 2006 at 6:31pm
Ok, thx for the tip
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.