how i can convert a string to YYYYMMDDMMHHSSFFF dateandtime field
*This post is locked for comments
how i can convert a string to YYYYMMDDMMHHSSFFF dateandtime field
*This post is locked for comments
Great ! Could you please close the thread by verifying helpful answer.
Thanks Goutam,
after splitting string into years,day,month,hrs,min,sec using sub-string function i convert the string pattern into DateandTime in crm using
DateTime dt = new DateTime(Convert.ToInt16(year), Convert.ToInt16(month), Convert.ToInt16(day), Convert.ToInt16(hrs), Convert.ToInt16(min), Convert.ToInt16(sec), Convert.ToInt32(milisec));
its worked absolutely fine for me.
Try with this -
social.msdn.microsoft.com/.../convert-from-string-to-datetime
Hi Pravin,
Thanks for the reply actually i want to convert the value of string type field into date and time in plugin,
DateTime.Now.ToString("yyyyMMddHHmmss"); this doesnt work for me
Hi Fariha,
Try this one:
JS:
var myStr = "19701029114010"; //your yyyymmddhhmmss value
var date = new Date(myStr.replace(
/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/,
'$4:$5:$6 $2/$3/$1'
));
Plugin:
DateTime.Now.ToString("yyyyMMddHHmmss");
André Arnaud de Cal...
292,489
Super User 2025 Season 1
Martin Dráb
231,305
Most Valuable Professional
nmaenpaa
101,156