x=20131105 arcpy.Select_analysis(daily_stations, daily_stations_Select, "\"daily_YearMonthDay\" = x")
query = " \"daily_YearMonthDay\" = 20131105 " arcpy.Select_analysis(daily_stations, daily_stations_Select, query)
x=20131105 query = " \"daily_YearMonthDay\" = {0} ".format(x) arcpy.Select_analysis(daily_stations, daily_stations_Select, query)
Thank you! It worked. I kept the variable x.