c# - How to remove mili seconds from '0' date formatting -


i trying convert datetime following format.

2015-05-30t12:00:00+05:30

when trying 'o' formatter getting out put in following format,

string plannedstarttime = starttime.tostring("o"); 

output:2015-06-12t16:54:47.3206929+05:30

i need remove mil seconds .

not getting formatters msdn

any other formatters?

you can use custom formatter:

string plannedstarttime = starttime.tostring("yyyy-mm-ddthh:mm:sszzz"); 

see custom date , time format strings


Comments

Popular posts from this blog

javascript - oscilloscope of speaker input stops rendering after a few seconds -

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -