Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need help with Subject line in VBS script for Email

Posted on 2011-03-24
2
Medium Priority
?
420 Views
Last Modified: 2012-05-11
I need a format which will use the current date -8 and the current date -1

Example would be:

MAIL.Subject = "the date is 3/15/2011 3/23/2011"

in a format similar to:

MAIL.Subject = "the date" & Mid(date1,1,InStr(1,date1," "))

not great at VB scripting, any help would be appreciated.
0
Comment
Question by:alexr54
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 2

Accepted Solution

by:
alexr54 earned 0 total points
ID: 35208716
figured it out

ate1 = DateAdd("d",-8,Now())
date3 = DateAdd("d",-1,Now())
MAIL.Subject = "the date" & Mid(date1,1,InStr(1,date1," ")) & Mid(date3,1,InStr(1,date3," "))
0
 
LVL 2

Author Closing Comment

by:alexr54
ID: 35208723
figured it out
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question