I'm trying to get details from athree FComboBoxes named "year", "month" and "day" and then insert the details into a MySql database in the "YYYYMMDD" format.
The method I use below gets me an output of "YYYY,MM,DD".
All I need to do is get rid of the comma's, but the "Strip" command as suggested by other threads here doesn't seem to work.
I think I must be either missing a basic principle here, or have missed an easier way to go about it.
TIA
Code:
dayValue=period.day.getValue(); // Extracting values
monthValue=period.maand.getValue(); // from drop down
yearValue=period.jaar.getValue(); // FComboBoxes
//adding "0's" for entry into Mysql Database
if(dayValue<10){
dayValue = "0" + dayValue;
}
if(monthValue<10){
monthValue = "0" + monthValue;
}
periodDate=[yearValue,monthValue,dayValue]; // Making array
NewPeriodDate = periodDate.split(",").join(""); // Doesn't work:confused:
trace(periodDate); // returns YYYY-MM-DD
trace(NewPeriodDate); // returns "undefined"
