OK, this should work:
VBA Code:
Sub MyFormatMacro()
Application.ScreenUpdating = False
Dim myFolder As String
Dim myFile As String
Dim wb As Workbook
' Designate folder to loop through
myFolder = "C:\Temp\Joe"
If Right(myFolder, 1) <> "\" Then myFolder = myFolder & "\"
' Loop through all Excel files in folder
myFile = Dir(myFolder & "*.xls*")
Do While myFile <> ""
Set wb = Workbooks.Open(Filename:=myFolder & myFile)
' Format column A
wb.Worksheets(1).Columns("A:A").NumberFormat = "yyyy-mm-dd hh:mm:ss"
' Save and close workbook
wb.Close SaveChanges:=True
' Get next file name
myFile = Dir
Loop
' Loop through all CSV files in folder
myFile = Dir(myFolder & "*.csv")
Do While myFile <> ""
Set wb = Workbooks.Open(Filename:=myFolder & myFile)
' Format column A
wb.Worksheets(1).Columns("A:A").NumberFormat = "yyyy-mm-dd hh:mm:ss"
' Save and close workbook
wb.Close SaveChanges:=True
' Get next file name
myFile = Dir
Loop
Application.ScreenUpdating = True
MsgBox "Macro complete!"
End Sub
Just change the file path to match your file path.
There may be a way to combine the two loops into one, but that will just make the macro a little shorter, and probably won't have much affect on run time.