Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Week Number RTV
Anything time related is tricky since it has to deal with leap this'es and that's. The week of the year isn't something available in my underlying C++ stuff either. If it doesn't have to be absolutely accurate, you can just get the Julian date for the 1st of Jan of the current year, then divide by 7. The current Julian date is available via action command but not the first of the year. You'd have to call CML to do that.

It would be something like:

1. Get current time stamp
2. Get it as individual time values
3. Leave the year value, but reset the month, day, hour, min, sec to indicate midnight the first of that year.
4. Set that back to to the time object
5. Get the Julian date from that
6. Get the current Julian date
7. Subtract the two then divide by seven
Dean Roddey
Explorans limites defectum

Messages In This Thread
Week Number RTV - by znelbok - 10-22-2019, 01:31 PM
RE: Week Number RTV - by Dean Roddey - 10-22-2019, 06:58 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Generate Random Number in a Trigger batwater 1 982 12-10-2017, 12:43 PM
Last Post: Dean Roddey
  Correspond image to number? jkmonroe 1 1,344 02-07-2015, 08:10 PM
Last Post: Dean Roddey
  vBulletin getting excess number of access violations Mark Stega 3 1,799 06-20-2014, 08:49 AM
Last Post: Dean Roddey
  Displaying slot number diy8888 18 4,169 05-19-2014, 05:22 AM
Last Post: Dean Roddey
  Not a Valid Zone Number for Blaster Jnetto 21 4,690 12-24-2013, 03:51 PM
Last Post: Dean Roddey
  Conver text to number? jpants 3 1,330 03-16-2010, 10:47 AM
Last Post: Dean Roddey
  Converting number of seconds to Hours:Minutes:Seconds electron 38 5,828 03-08-2010, 10:49 AM
Last Post: Dean Roddey
  Exception message line number beelzerob 10 1,931 06-23-2008, 07:33 AM
Last Post: beelzerob
  Current Page number for CAB? Squintz 8 1,327 03-04-2008, 10:18 AM
Last Post: ellisr63
  Number of records returned by DBStatement jrlewis 1 1,010 09-04-2007, 09:33 AM
Last Post: Dean Roddey

Forum Jump:

Users browsing this thread: 1 Guest(s)