This topic is locked

Date as DD-MM-YYYY

7/24/2006 8:16:29 AM
PHPRunner General questions
P
pauloc author

Hi
How do I collect a date of birth from users in the format DD-MM-YYYY
It would be nice to have 3 drop downs

1,2,3

Jan, Feb,

1995,1996
Once collected I need to display it in the DD-MM-YYYY format

then I need to calculate age.
Thanks

Paul

Alexey admin 7/24/2006

Paul,
choose Edit as - Date for your field on the Formatting tab in PHPRunner.
Then choose Date format you need.

P
pauloc author 7/26/2006

When I do choose the date format from PHPRunner the error below is produced when the page is run.
PHP error happened
Technical information
Error type 2048
Error description localtime() [function.localtime]: It is not safe to rely on the system's timezone settings. Please use the date.timezone setting, the TZ environment variable or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Australia/Melbourne' for '10.0/no DST' instead
URL localhost/test/personal_edit.php?editid=1
Error file c:\Inetpub\wwwroot\test\include\locale.php
Error line 258

J
Jane 7/26/2006

Pauloc,
with the latest version of PHP you have to tweak php.ini
Uncomment ;date.timezone =

and change it to

date.timezone = "America/Los_Angeles" or whatever your timezone is.



Then restart your web server.
The full list of supported timezones can be found here

http://www.php.net/manual/en/timezones.php