Date Time to String Question update

Hi,

I am using the following, which is throwing an error

myString = System.DateTime.Now.ToString(“MM/dd/yyyy”)

What is wrong with the assign?

Thank you,

Hi @A_Learner

Double quotes mistake

myString = System.DateTime.Now.ToString("MM/dd/yyyy")

@A_Learner

myString =DateTime.Now.ToString("MM/dd/yyyy")
1 Like

I am sorry, what is the mistake?

Thank you,

@A_Learner

Mistake in double quotes
Retype the double quotes and try

@A_Learner

Please give the double quotes properly.“MM/dd/yyyy”

1 Like

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