Hi I was trying to name my Excel file with the current date and time but I got some syntax error and then i tried to change the date and time format I faced this kindly help
Hi,
It may be double quote matter. In windows project, it’s caused by double quote except "
(0x22)
Can you try to replace all double quote with "
(Please copy and paste the above if needed)
Regards,
YourFileName+Now.ToString(“dd-MMM-yyyy HH:mm:ss”)
1 Like
Hi @Harsh_Garg
Remove double quotes and reassign it
1 Like
Hi @Harsh_Garg
Try this syntax:
DateTime.Now.Tostring("dd-MMM-yyyy")
The above syntax will print first 3 letters of Month name.
Refer the image:
DateTime.Now.Tostring("dd-MMMM-yyyy")
The above syntax will print with whole Month name.
Refer the image:
Hope it helps!!
Regards,
2 Likes
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.