I want to get the time in this format 2009-Sep-30 from 20090930
This should work:
eval t=strftime(strptime(<your date field>, "%Y%m%d"), "%Y-%b-%d")
View solution in original post