How to display Nearest Locations in Corona?

Hello again. Can both of these methods be done without a database? I’ll have to start building the app in the next few days.

You have to have some data.  It doesn’t need to be in a formal database.

Rob

Thanks for the response!

Of course but db was suggested because you could sort data using database queries. However you can always load some saved data and sort it yourself :slight_smile:

 

I tried using os.time and os.date to subtract the birth year from the current year. Below is the code I used.

 

print(os.time{year=1998, month=6, day=24, hour=0, sec=0}) --898660800 print(os.date("%G") - os.date("%G", 898660800) )

However, I notice that this doesn’t take into consideration the month and day of the birthday, thus giving an inaccurate age. For example, if someone turns 16 on June 24, 2014 , the age would already show as ‘16’ as soon as new year comes. It doesn’t wait until June 24 of that year. 

Does anyone know how I could get the age to change on the exact birthdate? Thanks.