Jump to content

Date and Time without punctuation


Shedunn
 Share

Recommended Posts

I've been looking through some different functions(not sure if that's the right word) to get the Date and time and I can't find one that doesn't include "/ " or ":" in what is returned.

I'm trying to create a file name with this format "QuickConfig_MMDDYYYY_HHMM"  (doesn't matter if 24 or 12hr format)

#include <Date.au3>

Func _SaveConfig
    
    MouseClick('primary',155, 46, 1, 0) ;clicks save as
    WinWait('Save bluePRINT Configuration As...','', 4)
    MouseClick('primary',632, 47, 1, 0) ;clicks the file path bar
            $Documents = @MyDocumentsDir
            $FilePath = $Documents & '\BP3 Configs'
                Send($FilePath)
                Send('{ENTER}')
    MouseClick('primary',166, 580, 1, 0) ;clicks file name bar
            $FileName = 'QuickConfig_' & _NowDate & '_' & _NowTime
            Send($FileName)
            Send('{ENTER}')
EndFunc

 

 

I'm wondering if there is a function somewhere to do this?

Link to comment
Share on other sites

  • Moderators

Just use the various macros perhaps?

Quote

$sFileName = "QuickConfig_" & @MON & @MDAY & @YEAR & "_" & @HOUR & @MIN
ConsoleWrite($sFileName & @CRLF)

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...