I want to convert dateTime to the above given format. I tried to look the docs but didnt find much information.
It should be formatted like this: myDateTime. ToString("yyyy/MM/dd hh:mm:ss"); or myDateTime. ToString("yyyy/MM/dd); Because mm is for minute and for month MM should be used.
string date = DateTime. ParseExact(SourceDate, "dd/MM/yyyy", CultureInfo. InvariantCulture). ToString("yyyy-MM-dd");
The DATETIME-TZ data type consists of three parts: · An ABL date and time (as for DATETIME) and. · An integer representing the time zone offset from Coordinated Universal Time (UTC) in minutes. ABL stores DATETIME-TZ data in UTC, along with the time zone offset of the DATETIME-TZ.
Just pass the format "yyyy-MM-dd'T'HH:mm:ss.fffffff'Z'"
to ToString
string str = DateTime.Now.ToString("yyyy-MM-dd'T'HH:mm:ss.fffffff'Z'");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With