sharepoint javascript date formatter


/ Published in: JavaScript
Save to your folder(s)

converts date/time that sharepoint kicks out to m/d/y format.


Copy this code and paste it in your HTML
  1. function dateCorrect(oldString)
  2. {
  3. var result = oldString.split(" ")[0];
  4. result = result.split("-");
  5. return result[1] + "/" + result[2] + "/" + result[0] ;
  6. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.