Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 404217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T17:17:17+00:00 2026-05-12T17:17:17+00:00

I currently have an app displaying the build number in its title window. That’s

  • 0

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…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T17:17:17+00:00Added an answer on May 12, 2026 at 5:17 pm

    Jeff Atwood had a few things to say about this issue in Determining Build Date the hard way.

    The most reliable method turns out to be retrieving the linker timestamp from the PE header embedded in the executable file — some C# code (by Joe Spivey) for that from the comments to Jeff’s article:

    public static DateTime GetLinkerTime(this Assembly assembly, TimeZoneInfo target = null)
    {
        var filePath = assembly.Location;
        const int c_PeHeaderOffset = 60;
        const int c_LinkerTimestampOffset = 8;
    
        var buffer = new byte[2048];
    
        using (var stream = new FileStream(filePath, FileMode.Open, FileAccess.Read))
            stream.Read(buffer, 0, 2048);
    
        var offset = BitConverter.ToInt32(buffer, c_PeHeaderOffset);
        var secondsSince1970 = BitConverter.ToInt32(buffer, offset + c_LinkerTimestampOffset);
        var epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
    
        var linkTimeUtc = epoch.AddSeconds(secondsSince1970);
    
        var tz = target ?? TimeZoneInfo.Local;
        var localTime = TimeZoneInfo.ConvertTimeFromUtc(linkTimeUtc, tz);
    
        return localTime;
    }
    

    Usage example:

    var linkTimeLocal = Assembly.GetExecutingAssembly().GetLinkerTime();
    

    Note: this method works for .NET Core 1.0, but stopped working after .NET Core 1.1 – it gives random years in the 1900-2020 range.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have an app that requires connection to a server in multiple activities.
currently I have an app that creates all sorts of different requests to Facebook
I currently have a deployed app (fortworth.herokuapp.com) that I am attempting to sort movies
I currently have an iPhone app that lets the users take video, upload it
I have an iPhone app that is currently using the test environment for iAds.
I currently have an app that is using a twitter bootstrap modal box. The
I currently have an app published on the App Store but I've just updated
I currently have a app on the market it saves some data with onRetainNonConfigurationInstance
I currently have an app deployed on Heroku which runs on two web dynos
I'm making a painting app, and I currently have the app at a point

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.