how do I get the version dates in vb

T

TFS

I am new to vb net and was wondering if there is an equivalent to the
__DATE__
and __TIME__ macros in C/C++.

That is I'd like to get the date/time the program was "compiled".

Is there an easy way to get this?

Thanks a lot in advance,
--TFS
 
M

Mythran

TFS said:
I am new to vb net and was wondering if there is an equivalent to the
__DATE__
and __TIME__ macros in C/C++.

That is I'd like to get the date/time the program was "compiled".

Is there an easy way to get this?

Thanks a lot in advance,
--TFS

I do not think there is any way to retrieve the date/time an assembly was
compiled. AFAIK, it's not written to the assembly...anywhere.

:(

Mythran
 
A

Armin Zingler

TFS said:
I am new to vb net and was wondering if there is an equivalent to the
__DATE__
and __TIME__ macros in C/C++.

That is I'd like to get the date/time the program was "compiled".

Is there an easy way to get this?

No, no easy way. Maybe...

- Use "1.0.*.*" as the assembly version and retrieve it at runtime (use
a function for that to supstitute __DATE__ or __TIME__). The asterisks
determine the number of days since 1/1/2000 and seconds since midnight
(see AssemblyVersionAttribute).

- Use the pre-build event to start a tool that writes the current
date/time into a source code file. Well, far-fetched maybe...

- An Addin?

Just some thoughts.

The exe's/dll's change date is insufficient? Depends on why you need the
compile date/time.


Armin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top