Self Registration - Date showing as unreadble numbers only

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
sing2trees
Forum Members
Forum Members
Posts: 38
Joined: Thu May 28, 2009 9:00 pm

Self Registration - Date showing as unreadble numbers only

Post by sing2trees »

Hi,

I have a date of birth field in the self-registration module.

When a user signs up, they enter their date of birth, however whenever I export the data (from the Admin section of Frontend User Management), the date of birth only shows as numbers.

Ie:
17th February 1983 exports as:
414288000

Does anyone know how I can fix this?

Thanks in advance!
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Self Registration - Date showing as unreadble numbers only

Post by jmcgin51 »

The stored value is a Unix timestamp.  You need a script to convert it to a m/d/y format.

http://www.onlineconversion.com/unix_time.htm
http://www.unixtimestamp.com/index.php
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: Self Registration - Date showing as unreadble numbers only

Post by calguy1000 »

use the cms_date_format smarty modifier that is included with CMS Made Simple.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
sing2trees
Forum Members
Forum Members
Posts: 38
Joined: Thu May 28, 2009 9:00 pm

Re: Self Registration - Date showing as unreadble numbers only

Post by sing2trees »

calguy1000 wrote: use the cms_date_format smarty modifier that is included with CMS Made Simple.
Hi - where abouts do I find this?

Thanks in advance!
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Self Registration - Date showing as unreadble numbers only

Post by jmcgin51 »

something like this

{$yourdatetimevariable|cms_date_format} //will output the default date/time as you specified in the admin panel (Global Settings > General Settings)

or
{$yourdatetimevariable|cms_date_format:"%d-%m-%Y"} //will output the date/time in the format specified in the tag

http://php.net/strftime
sing2trees
Forum Members
Forum Members
Posts: 38
Joined: Thu May 28, 2009 9:00 pm

Re: Self Registration - Date showing as unreadble numbers only

Post by sing2trees »

The way I set this up was using the self registration module - so where would I add the code to convert it?

Sorry for all the questions - I really appreciate everyones help
Jeff
Power Poster
Power Poster
Posts: 961
Joined: Mon Jan 21, 2008 5:51 pm
Location: MI

Re: Self Registration - Date showing as unreadble numbers only

Post by Jeff »

This is an issue with the Export function in FEU not in the Self Registration module.
jmcgin51
Power Poster
Power Poster
Posts: 1899
Joined: Mon Jun 12, 2006 9:02 pm

Re: Self Registration - Date showing as unreadble numbers only

Post by jmcgin51 »

It sounds like you want the FEU export feature to export the date in a "human-readable" format.  You can submit a feature request for FEU in the Forge.

Until that feature is implemented, you will need to run a formula on that CSV field (after the export is complete) to convert Unix to time/date.

Here is a link to get you started:
spreadsheetpage.com/index.php/tip/converting_unix_timestamps/
Post Reply

Return to “Modules/Add-Ons”