Dates, Formating, and Cutting out Characters

I have two variables named "starttime" and "endtime". Both are stored as doubles. And, both are formatted "YYYY-MM-DD HH:MM:SS".

1) How might I be able to changes these dates into "YYYY-MM" format?
2) How can I change each date to a different month? (Example, the data reads "2006-11", but I want to turn it into "2006-10")

Thanks for taking the time to read this! I appreciate your help!
1) This is easily done in Excel with the "left()" function.
2) Can you be more precise. Du you want all months to be the same or add 1 month etc?
1) My dataset is too large to load in stata, so I can't use the left() function
2) I want all the dates to be minus 1 month. Ex: I want to change Dec-2010 to Nov-2010.



Actually it's much easier than this; Stata handles dates very well.
* convert time from clock to day format, then from day to month format
gen startmonth=mofd(dofc(starttime))
format %tm startmonth

* subtract 1 month
gen minus1month=startmonth - 1
format %tm minus1month
You could of course combine these commands:
gen minus1month=mofd(dofc(starttime)) - 1
format %tm startmonth
Since the month format counts months (as its name implies), you can work out the difference in months from starttime to endtime as:
gen monthselapsed=mofd(dofc(endtime)) - mofd(dofc(starttime))
You said that your dates were stored as doubles, but then mentioned converting from a string variable. If they're really stored as doubles ("clock" time) then you don't need to convert to string. If they're string then you need to convert back to a numeric value, eg:
gen startmonth=mofd(date(starttime, "YMD"))
See -help dates_and_times- for more info. It's a bit complex but it's well worth reading.