You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In SPSS DateTime seems to be stored as number of seconds from start of the Gregorian calendar.
So you can use a function like this to calculate the value:
doubleGetSpssDateTimeValue(DateTimevalue){// SPSS uses this date as its zero dateDateTimeepocStart=newDateTime(1582,10,14,0,0,0,DateTimeKind.Unspecified);returnvalue.Subtract(epocStart).TotalSeconds;}
Then use code like this to set the variable value:
newRecord[0]=GetSpssDateTimeValue(DateTime.Now);
A datetime variable definition looks something like this
I want to add DateTime to newRecord[0] = DateTime.Now;
Which is not working, in valid cast error?
The text was updated successfully, but these errors were encountered: