SQL accepts this format for datetime yyyy-MM-dd HH:mm:ss and I am getting MM/dd/yyyy HH:mm:ss format

I should pass a datetime variable but I am not able to.
the time will be Datetime.Now
I want this to be updated in datetime type with yyyy-MM-dd HH:mm:ss format

HI,

Do you want to pass yyy-MM-dd HH:mmm:ss style datetime as String?
If so the following will help you.

DateTime.Now.ToString(" yyyy-MM-dd HH:mm:ss")

image

Regards,

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