survival analysis - setting up data for Stata stset

#1
Hello,
I've the following dataset:

where:
date0 and date1 are initial and final period
phase=1 indicates expansion and phase=-1 contraction
outcome=failure and outcome=0 otherwise
duration counts the time period for each phase
var1 and var2 are two variables

My question is how to write the comand in stata for stset?
I've tried the following:
stset date1, failure(outcome=1) time0(date0) origin(time date0)
but it does not seem correct.
Also, I want _t to count the time span as the variable ui in my dataset, i.e., not from the beginning of the phase but from the second observation.
Any help.
Thanks a lot.
Francesco