SyntaxFix
Write A Post
Hire A Developer
Questions
You can try with
var result = DateTime.Now.ToString("yyyy-MM-d--HH-mm-ss");