Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
I have the following VBScript module.
Can you tell me how can i insert the timestamp in the name of the exported file ?
like SALES_20150210 1605.txt
Sub ExportFiles
pathcorp="\\99.99.999.99\c$\SALES\"
vx=timestamp(now())
set corp = ActiveDocument.GetSheetObject("CH11")
corp.ServerSideExportEx pathcorp & "SALES_" &vx& ".txt" , ";" , 1
end sub
I have change the setting in the script of the QVW file like below.
SET TimestampFormat='YYYYMMDD hhmm';
but does not work.
Can anyone help me ?
Hi Gou, I'm not sure if timestamp works, you can use:
vx=Year(Now()) & Right("0" & Month(Now()), 2) & Right("0" & Day(Now()), 2) & " " & Right("0" & Hour(Now()), 2) & Right("0" & Minute(Now()), 2)
Hi Gou, I'm not sure if timestamp works, you can use:
vx=Year(Now()) & Right("0" & Month(Now()), 2) & Right("0" & Day(Now()), 2) & " " & Right("0" & Hour(Now()), 2) & Right("0" & Minute(Now()), 2)
Hi,
Create a variable and assign the value date(today()). And pass the variable in the macro.
Regards
Sathish