Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attachmate - Get today's date. 1

Status
Not open for further replies.

Christadelphian

Technical User
Feb 17, 2008
14
0
0
GB
Good Day,

Can anyone help me with a Query please?
I am writing a Macro which will generate emails and populate various aspects of information within the mail before sending. I have managed to get the email generated, with all required fields populated, except one.

I need to have the Macro automatically read today's date, do a little calculation and then have the newly calculated date presented in the generated email.
The macro is written in Extra basic and is designed for use with Attachmate Extra!.

My problem however stems from the fact that I don't know of a way to have the macro obtain today's date. The date must be present somewhere in Extra, however I have no idea where.
The calculation is a simple one (todays date plus 20 days) and won't be hard to code, however I just don't know where within the system to get the date.

Please can someone help me locate where to get today's date from within Extra! and possibly suggest a little code to help me retrieve it?

Has been many years since my VB programming days!
 
You can use the Date() function:
Code:
Sub DateAdd()
    Msgbox Date()
    Msgbox Format(Date() + 20, "MMMM DD, YYYY")
End Sub

Change the date format to suit your needs.
 




...and also keep in mind that the Format function returns a STRING and not a DATE.

Skip,
[sub]
[glasses]I'll be dressed to the nines this week, as I go to have my prostatectomy...
Because, if I'm gonna BE impotent, I want to LOOK impotent![tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top