| Quintiq file version 2.0 | 
| #parent: #root | 
| StaticMethod Convert3DSpaceStringToDate ( | 
|   String dateAsString_i | 
| ) as Date | 
| { | 
|   Description: 'Convert a String in the 3DSpace Date- or DateTime-format to a Date.' | 
|   TextBody: | 
|   [* | 
|     // Create a DateConverter that uses the expected format. | 
|     mask := LibDIF_Util::DATE_FORMAT_3DSPACE(); | 
|      | 
|     converter := StringToDate::StandardConverter(); | 
|     converter.SetCustomConversion(); | 
|     converter.CustomFormatString( mask ); | 
|      | 
|     // Only using the length of the mask makes it possible to also convert a DateTime into a Date. | 
|     return converter.Convert( dateAsString_i.SubString( 0, mask.Length() ) ); | 
|   *] | 
| } |