I am aware that linux has timestamp info available to prog. langs. which is very handy.
I m developing a program and i need to append date time to the created file. and it should be unique.
Later on I want to parse the files, but i want to parse the latest one only.
Is there such option in .net like timestamp in *nix systems?
Any examples out there?
Thanks.
You could use the Ticks property of a DateTime structure. It’s not compatible with the UNIX timestamp, but it can be used to return a long (Int64) that represents the date and time with a precision of one ten-millionth of a second. E.g.
At time of writing this returns the value of
634074617762026300You can convert ticks back to a DateTime in the constructor. E.g.