string to date

 

 got stuck in comparing the string to date with current date time.

 

 int YY=TimeYear(  Time[0]);   // Year

         int MN=TimeMonth( Time[0]);   // Month         

         int DD=TimeDay(   Time[0]);   // Day

         int HH=TimeHour(  Time[0]);   // Hour         

         int MM=TimeMinute(Time[0]);   // Minute

         

         string now2=DD+"/0"+MN+"/"+YY;

       datetime ped=D'13.10.14 06:00';

  here my format is DD/MN/YY

how can i compare the date of two different formate.

 Note

Converts string to time  in the format "yyyy.mm.dd hh:mi" 

Any help much appreciated . 

 

Thanks Geeks for not answering i have found the coding.

StrToTime(string);