c# - Parse to "American format" on my DateTime to work with a stored procedures in SQL? -


i have stored procedure takes 2 parameters.

one int , datetime has formatted this: yyyy-mm-dd hh:mm:ss, parsing in c# gives me format: dd-mm-yyyy hh:mm:ss. european format.

how can parse starting year, shown above.

i need datetime , not string, stored procedure won't allow string.

try following example

datetime dt = datetime.now; string formatteddate = dt.tostring("yyyy-mm-dd hh:mm:ss"); 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -