ParseDate

DVar ParseDate(String inDateFormat, String inDate)

Description

Parses the following Date String according to the supplied Date Format.
Notice that Date Formats are different based on the platform the code is run on.

Parameters

The following is a list of parameters the functions receives 

Parameter Type Description
inDateFormat string Formatting used for parsing the date
inDate string The Date String to parse


Return Type

DVar

Example

If using this method, it is best to make sure the format specifiers either work for both the PC/Emulator platform and android:
if (IsPlatform(ePlatform.Android)){
return ParseDate("EEE MMM dd HH:mm:ss yyyy", "Mon Feb 01 12:00:00 2016");

else {
return ParseDate("ddd MMM dd HH:mm:ss yyyy", "Mon Feb 01 12:00:00 2016");
}
Information regarding the format specifiers can be found at:
Android: https://docs.oracle.com/javase/tutorial/i18n/format/simpleDateFormat.html
PC/Emulator: https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.