Does anyone know how to configure dates from SAS to SPSS? - sas

I'm having trouble transforming dates from SAS to SPSS. I used the following coding but my dates, that should be all in 2020, is showing up as 2080. Does anyone have any idea what could be wrong with my code? I'd appreciate having your input. Thank you very much.
COMPUTE spss_date1=(VAR_fromSAS +xdate.tday(date.mdy(1,1,1960)))*86400.
Formats spss_date1 (adate10).
list VAR_fromSAS spss_date1.
EXECUTE.
Example of my Output:
44063 | 08/21/2080
44070 | 08/28/2080
44092 | 09/19/2080

Related

Lookup Functions not giving exact result

I have a little problem getting the result i wanted from the data that i have.
I tried index match match and vlook up match but it doesnt give me the result that i wanted.
Please see the sample data that I have. DATA 1
I wanted to get the # of hours based from this table TABLE
Can someone help me get the correct syntax for this please?
Tried several things to go around the with formulas but ended up either just 1 result for the whole column or an error. Thanks
up for this.

Change data format in Mathematica

I'm new to Mathematica. I'n using the online trial version12.1. I have got a sample data like
result =Import["/wolframcloud/userfiles/../data/data.csv"]
>> {{1,1,0,0,1,1,0,0,0,0,1}}
But I want data format like {1,1,0,0,1,1,0,0,0,0,1} because I need to do transpose later. So how can I achieve this? What is the difference between {{}} and {}? Thanks so much!

Having issues with Google Sheets formula combing ArrayFormula with IF

This works the way I want it to but I want to use the ArrayFormula to add the formula to the whole column starting at Cell J2:
=IF(E2:E="Closed","",MINUS(TODAY(),I2))
This doesn't work:
=ARRAYFORMULA(IF(E2:E="Closed","",,J2:J), MINUS(TODAY(),I2))
I have tried multiple ways to add the ArrayFormula into it and reorganized it multiple ways but it failed.
Any ideas where I am going wrong?
Any help appreciated!
Please use the following formula
=ArrayFormula(IF(I2:I<>"", IF(E2:E="Closed","CL",MINUS(TODAY(),I2:I)),""))
(where today is May 20th. Adjust ranges and notifications to your liking)

How to delete a url in each string from a dataset

I have a dataset in which 1 column has the tweets and other column has labels for the tweets. My problem is I want the html links present in the tweets to be removed for example
RT #AmDiabetesAssn: Know what’s scary? These #diabetes statistics. Spread awareness this November for #DiabetesMonth! http://t.co/qIiiSc4ozZ
I have a tweet as given above i want to remove(http://t.co/qIiiSc4ozZ) and want the output in this way, for all the strings.
RT #AmDiabetesAssn: Know what’s scary? These #diabetes statistics. Spread awareness this November for #DiabetesMonth!
I have seen many examples and tried those but couldn't get the desired result. Please help. Thanks in advance.
I tried this, which should work for any links that don't have spaces in them:
for tweet in tweets:
print re.sub(r'http://\S+\s?','',tweet)
I assume here that you've got a bunch of strings in the tweets array that represent the first column that you described above (also that you want them printed). You should be able to modify to suit the iteration pattern you're using.

what formular can i use to get 3 STATUSES OF output of Late, ontime and early in text from comparing dates in SHAREPOINT 2007

I am trying to determine 3 statuses comparing a Due date to a Completed Date with an output of On Time, Late and Early, I can get the Late and Early to work perfectly but it sees On Time results as Late.
HERE IS THE FORMULAR IM USING AT THE MOMENT, AND ITS NOT WORKING
=IF([FeasibilityTracker_Date Due]<=[FeasibilityTracker_Date Delivered],"Ontime","Early","LATE")
Does anyone have ideas on how to fix this?