Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

Birthday format

11 years 2 months ago
Licenses:
JomSocial Active

Hi...
I'm having troubles with the way that the date format is stored in database...
1. When you write the birthday in the backend it recive in the format 2014-08-18 (YYYY-MM-DD)



2. When you see in database... the birthday is stored as 2014-8-18 (YYYY-M-DD)


This is causing problems.. because I'm developing a module that shows next birthdays.. but in database theres no uniformity...
I created manually the birthdays because I needed to import them from another source.. but jomsocial is not coherent with that

Attachments:
11 years 2 months ago
Licenses:

Hi Victor,

here my suggestions:
if that module that you developed using MySQL query, you can use

DATE_FORMAT(datefield,'%Y-%m-%d')
if using php you can use
$newDate = new DateTime($datevalue);
echo date_format($newDate, 'Y-m-d'); 

so the date output will uniformity.

Regards

Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW