Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Convert current date and time into timestamp object

$
0
0

Hi,

Following is the code for converting java datestamp to date (1520488577604 to 3/12/2018 8:07:02 PM)

     new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)
        .AddMilliseconds((long)value) // put your value here
         .ToLocalTime().ToString("g");

I need to reverse this feature, need to convert from 3/12/2018 8:07:02 PM to 1520488577604.
Please suggest a solution for this?
Thanks in advance :)


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>