MATLAB: Separate date from time

date

hi,
i have timestamp in my data
such as:
874965478
which contains date and time
what I need is separate date from time
I try this
d=datestr(874965478/86400 + datenum('1/1/1970'))
and get
d =
22-Sep-1997 21:57:58
this result do not what i need, i want the timestamp remain integer but without time just date
can do that?

Best Answer

The function, floor, does it:
>> floor( 874965478/86400 + datenum('1/1/1970') )
ans =
729655
and check the result
>> datestr( ans, 31 )
ans =
1997-09-22 00:00:00
>>
This, 729655, is serial date number.