GEt day of week from date string

General Macro Scheduler discussion

Moderators: Dorian (MJT support), JRL

Post Reply
timle
Pro Scripter
Posts: 96
Joined: Tue Apr 20, 2004 5:53 am

GEt day of week from date string

Post by timle » Mon Nov 04, 2019 8:54 pm

Hello,
How can I translate any given date to day of week
for example if 10302019 is wednesday then do something

%DayofWeek% get me today's date but I dont know how to get the back date

Thank you

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Get day of week from date string

Post by JRL » Tue Nov 05, 2019 2:13 am

Code: Select all

VBEval>WeekdayName(Weekday("2019-10-30",0)),vDayoftheWeek
MDL>vDayoftheWeek

timle
Pro Scripter
Posts: 96
Joined: Tue Apr 20, 2004 5:53 am

Re: GEt day of week from date string

Post by timle » Tue Nov 05, 2019 7:12 pm

Thank you..what is the good way to learn Vb?

User avatar
JRL
Automation Wizard
Posts: 3497
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: GEt day of week from date string

Post by JRL » Tue Nov 05, 2019 8:58 pm

I don't know. Though in today's world and with Macro Scheduler's capabilities you'd probably be better off putting your efforts into learning Python rather than the antiquated VBScript.

I usually search for code snippets that are close to what I want then alter them to try to accomplish my goal. A lot of trial and error with no guarantee for success.

As a function reference, I like W3Schools.

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts