c# - Show current date time from CRM in the front end? -


i have logic below answer value in crm 01/08/2015 23:00:00, in front end changes expiry date show 02/08/2015, adding 1 day not sure why, how show same date crm? below code, have below show utc or something?

list<answer> answers = queries.formanswersqueries.getanswers(correctformanswer.id).fetchentities<answer>(connection.organizationservice);  if (answers != null) {     answers = answers         .groupby(c => c.question.id)         .select(g => g.orderbydescending(c => c.createdon).first()).tolist(); } 

dynamics crm stores datetime fields in utc format in database. when retrieve come & have convert required local timezone.

use localtimefromutctimerequest manipulate datetime.

the sdk web services can accept either local datetime or utc datetime when performing create/update, return utc date on retrieve/retrievemultiple.

read more


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -