Recent

Author Topic: Get build-date of application at runtime  (Read 4837 times)

bastla

  • New Member
  • *
  • Posts: 23
Get build-date of application at runtime
« on: March 28, 2013, 09:36:18 pm »
Hello everybody,

maybe this is a silly question, but I like to know wether there is a function to receive/detect the date of that day the application was build at run-time? Maybe there're also some function which provide other information, e. g. the version of FPC or the used version of LCL.

Hope, there exists methods like these.

Greetings,
bastla

wp

  • Hero Member
  • *****
  • Posts: 13508
Re: Get build-date of application at runtime
« Reply #1 on: March 28, 2013, 09:42:02 pm »
Found this amazing procedure somewhere - however, it's the compile time only, not the build time:
Code: [Select]
var
  dt: TDateTime;
//...
  dt := StrToDateTime({$I %DATE%} + ' ' + {$I %TIME%}, fs);

bastla

  • New Member
  • *
  • Posts: 23
Re: Get build-date of application at runtime
« Reply #2 on: March 28, 2013, 11:16:02 pm »
Thank you, wp!
This seems to be exactly what I was searching for!

Greetings,
bastla

 

TinyPortal © 2005-2018