Backup filename with date format

User avatar
burrina
4StarLounger
Posts: 550
Joined: 30 Jul 2014, 23:58

Backup filename with date format

Post by burrina »

I'm trying to add my date format to my database name with extension with no luck.
What am I missing?

Code: Select all

Dim FileName As String
Dim FileFormat As String
Dim objFSO As Object

FileFormat = Format(Now(), "_mm-dd-yyyy hh-mm AM/PM")  
FileName = objFSO.GetFileName(CurrentDb.Name) & FileFormat = Format(Now(), "_mm-dd-yyyy hh-mm AM/PM")
Me.BackupFileName = FileName

User avatar
burrina
4StarLounger
Posts: 550
Joined: 30 Jul 2014, 23:58

Re: Backup filename with date format

Post by burrina »

I resolved the format.
Thanks,