vba - Excel Macro : How can I get the timestamp in "yyyy-MM-dd hh:mm:ss" format? -


I am using DateTime.Now in my code macro to show the current timestamp .

This timestamp shows in the format "dd-MM-yyyy hh: mm: ss".

Instead, how do I get a timestamp in "yyyy-MM-dd hh: mm: ss"? Format?

Try it with: format (now (), "yyyy-MM-dd hh : Mm: ss ")

Comments