Posts Tagged padding

Generate Date from a range in Mysql and pad the results where no date is present

If you want to generate dates, MYSQL doesn’t have a range function, so I wrote a work around for the same. So how  it works is I have reused a code to generate numbers from my previous post. So I added date function to that query and reduce the generated numbers from the date. Hence effectively its Currrent Date – x number of days. Thus we generate the dates from the date we provide to the x number we generate. So here is the code:

Read the rest of this entry »


, , , , , , , ,

No Comments

Switch to our mobile site