Topic Path: Symbol Reference > Functions > StrInternetToDateTime Function
StrInternetToDateTime Function
function StrInternetToDateTime(
    Value: string
): TIdDateTime;
The Internet timestamp to be converted. 

TDateTime - The native date and time value for the timestamp.

StrInternetToDateTime is a TDateTime function used to convert the Internet timestamp in Value to a native date and time value. If Value is an empty string, or an exception occurs during conversion, the retrun value is set to 0.0. 

Value may contain a string matching one of the following Date Time format strings: 


  ddd[,][ ]d[-| ]mmm[-| ]yy[yy][-| ][hh:nn:ss]
  ddd[,][ ]mmm[-| ]d[-| ]yy[yy][-| ][hh:nn:ss]
  ddd[,][ ]d[-| ]mmm[ ][hh:nn:ss]yy[yy]
  ddd[,][ ]mmm[-| ]d[ ][hh:nn:ss]yy[yy]


The following are some examples of valid content in Value: 


  Fri 7-Sep-2002
  Fri 7-Sep-2002 15:23:59
  Fri 7-Sep 15:23:59 2002
  Fri 7 Sep 2002
  Fri 7 Sep 2002 15:23:59
  Fri 7 Sep 15:23:59 2002
  Fri, 7-Sep-2002
  Fri, 7-Sep-2002 15:23:59
  Fri, 7-Sep 15:23:59 2002
  Fri, 7 Sep 2002
  Fri, 7 Sep 2002 15:23:59
  Fri, 7 Sep 15:23:59 2002
  Fri,7-Sep-2002 15:23:59
  Fri,7-Sep 15:23:59 2002
  Fri,7 Sep 2002
  Fri,7 Sep 2002 15:23:59
  Fri,7 Sep 15:23:59 2002


To convert a value from a TDateTime to an Internet timestamp, use the DateTimeToInternetStr function.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.