How to convert this text "04/09/2015T06:00:00.000Z" into a valid apex datetime ?
where the time should be unmodified
[SalesForce] how to convert “04/09/2015T06:00:00.000Z” into apex datetime
Related Topic
- [SalesForce] How to convert date string to DateTime type without GMT
- [SalesForce] How to convert string into datetime format
- [SalesForce] Convert Datetime of one Timezone to Datetime of another TimeZone
- [SalesForce] Convert String DateTime to User local DateTime
- [SalesForce] Convert string time to datetime with timezone
- Unix Timestamp Conversion – How to Convert Unix Timestamp with Timezone Offset into Apex Datetime
- [SalesForce] How to convert 08:00:00.000Z to 08:00 AM and 18:00:00.000Z to 06:00 PM in salesforce apex
Best Answer
I don't think you can convert it in one go. You should dissect the string and convert. Look at the following code it will do it :
Just try this out, it should work.