This topic is locked
[SOLVED]

 PHP Now() returns Date and Time

3/16/2010 4:51:43 PM
PHPRunner General questions
J
joevoirol author

I am using PHPRunner 5.2 build 5106
I am having problems with an add form. The field is a date field and the default value is now().
It is returning the date AND time. I just want the date.
Has anyone seen this before?

Sergey Kornilov admin 3/16/2010

Now() returns date and time by design.
You can try something like strftime("%Y-%m-%d")

More info: http://php.net/manual/en/function.strftime.php

J
joevoirol author 3/19/2010

Thanks that fixed the problem. I did not have this problem with 5.1, I used Now() and it just put in the date.