How can I add date with this path "flight_mov_arr(0)"

how can i add date with this path “flight_mov_arr(0)”

1 Like

can you give an example?

1 Like

i am getting first file from a folder using string array mention above. i wanna add today date with the file name getting from string array

Hi @mu_nazza ,
You can do like below
"FileName_"+DateTime.Now.Tostring("MM-dd-yyy")

1 Like

you mean if flight_mov_arr(0) = “test.txt” you want to get
“test 13-05-2022.txt” ?

yes exactly.

do this:

path.GetFileNameWithoutExtension(flight_mov_arr(0))+Now.tostring("dd-MM-yyyy")+Path.GetExtension(flight_mov_arr(0))

Example
image

thanks. it worked for me

1 Like

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