I am trying to do this:
string thisReturn = "";
DateTime now = DateTime.UtcNow;
now = new DateTime (now.Year, 1, 1);
int yearDay = (int)(now.Subtract (new DateTime (1970, 1, 1))).TotalSeconds;
thisReturn = yearDay + "000";
Which will return this: 1451606400000
EDIT
I have now done this:
var unix = Math.round(+new Date()/1000);
var timestamp = unix+"000";
This will return this: 1480661530000
Almost there, but how do I set it to the 1st of january current year?
Now, how do I do exactly the same in javascript?
Hoping for help and thanks in advance :-)