Displaying the build date

I currently have an app displaying the build number in its title window. That’s well and good except it means nothing to most of the users, who want to know if they have the latest build – they tend to refer to it as “last Thursday’s” rather than build 1.0.8.4321.

The plan is to put the build date there instead – So “App built on 21/10/2009” for example.

I’m struggling to find a programmatic way to pull the build date out as a text string for use like this.

For the build number, I used:

Assembly.GetExecutingAssembly().GetName().Version.ToString()

after defining how those came up.

I’d like something like that for the compile date (and time, for bonus points).

Pointers here much appreciated (excuse pun if appropriate), or neater solutions…

30 Answers
30

Leave a Comment