Specific name format of a file


Could someone who speaks VB please help me?

This is regarding a name of a file and this is what I currently have:

mydirectory\name “+Datetime.Now.Tostring(“dd.MM.yyyy”)+”.xlsx"

and the name is then: name 12.04.2023.xlsx

However I need it to be: 12.04.2023 name 13;39.xlsx

so I need the date before the name +
*this 13;39 is current hour, it doesn’t have to be like that, it can show only hour for example: 1PM".

Does anyone know how to change my line so that it will show the above?

Many thanks

Hi @marcin.chowaniec

Give a try to this

"mydirectory\"+Datetime.Now.Tostring("dd.MM.yyyy")+" name "+Datetime.Now.Tostring("HH;mm")+".xlsx"

Hope this helps.

Hi @marcin.chowaniec ,

Try this:

“mydirectory"+Datetime.Now.Tostring(“dd.MM.yyyy”)+” name “+Datetime.Now.Tostring(“htt”)+”.xlsx"


mydirectory\22.02.2023 name 1PM


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.