Table of contents
TOC
Collapse the table of content
Expand the table of content

DateTimeZone.ToLocal

Owen Duncan|Last Updated: 10/5/2018
|
1 Contributor

About

Returns a DateTime value from the local time zone.

DateTimeZone.ToLocal(dateTime as datetimezone) as nullable datetimezone  

Arguments

ArgumentDescription
dateTimeThe DateTimeZone to convert.

Example

//assuming local as PST   
dateTime  = DateTimeZone.FromText("2011-02-20T22:19:27+03:00")  
localTime=DateTimeZone.ToLocal(dateTime) equals 2011-02-20T11:19:27-08:00  
© 2018 Microsoft