Does anybody have a script or even a good idea on how to get the current week number? ie. this was posted during week 51.
I am hoping that my EU Macro Scheduler brethren have already solved this problem.
Thanks in advance.
Script for returning week number
Moderators: Dorian (MJT support), JRL
Script for returning week number
Andrew Tapper
Engineering Manager
Forward Technology
Cokato, MN
Engineering Manager
Forward Technology
Cokato, MN
- Marcus Tettmar
- Site Admin
- Posts: 7380
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
VBSTART
VBEND
VBEval>datepart("ww",date()),weeknumber
VBEND
VBEval>datepart("ww",date()),weeknumber
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Re: Script for returning week number
i m trying to get the week number but i m getting
syntax error
line 5 column 6
any ideas why?i m using MS13
syntax error
line 5 column 6
any ideas why?i m using MS13
Re: Script for returning week number
Probably trailing spaces after VBSTART and VBEND that should not be there?
Re: Script for returning week number
hehehehe thank you
- CyberCitizen
- Automation Wizard
- Posts: 721
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
Re: Script for returning week number
I need a way of returning what the date would be on Sunday every week.
Eg so if I run the script today I need to know what Sunday's date would be.
Eg so if I run the script today I need to know what Sunday's date would be.
FIREFIGHTER
Re: Script for returning week number
Hi, DayOfWeek> will give you which day it is today (Sun = 1). Today is Tue ie the weekday is 3, then you need to add 5 days (7-3+1) to today's date to get Sunday's date. Or do you need next Sunday's date given a specific date or week number?
- CyberCitizen
- Automation Wizard
- Posts: 721
- Joined: Sun Jun 20, 2004 7:06 am
- Location: Adelaide, South Australia
Re: Script for returning week number
I need to be able to open a file say today and know what the date is on Sunday.
I then need to be able to open it in 2 days and know the date for Sunday.
I then need to be able to open it in 2 days and know the date for Sunday.
FIREFIGHTER
Re: Script for returning week number
Will this work?
Code: Select all
DayOfWeek>daytoday
Let>DaystoSun={7-%daytoday%+1}
GetDate>currDate
DateAdd>currDate,D,DaystoSun,strSunDate
MDL>Next Sunday: %strSunDate%