CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 date format problems, 1970

Print topic Send  topic

Author Message
thomas2340

Posts: 55
Posted: 04/12/2004, 1:55 AM

hi,

iam using php,mysql,freebsd,ccs

i want to set the value of textbox like this

$fldwv_date = date("m-d-y",mktime(0,0,0,date("m"),date("d")+1,date("Y")));
$contacts_insert->wv_date->SetValue($fldwv_date);

the field has the format date, if i change to text its ok, but i got trouble inserting the value into the database.

with field format date i got every time 01.01.1970 shown.

has someone an idea ?
View profile  Send private message
JCF
Posted: 04/13/2004, 10:22 AM

I have found that you need to us datetime data type if you want to use date
before 1970.

I think this is your problem - Not sure from you description.

JCF

"thomas2340" <thomas2340@forum.codecharge> wrote in message
news:5407a5980df1b6@news.codecharge.com...
> hi,
>
> iam using php,mysql,freebsd,ccs
>
> i want to set the value of textbox like this
>
> $fldwv_date = date("m-d-y",mktime(0,0,0,date("m"),date("d")+1,date("Y")));
> $contacts_insert->wv_date->SetValue($fldwv_date);
>
> the field has the format date, if i change to text its ok, but i got
trouble
> inserting the value into the database.
>
> with field format date i got every time 01.01.1970 shown.
>
> has someone an idea ?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

thomas2340

Posts: 55
Posted: 04/14/2004, 7:07 AM

i got the solution myself

just use the unix time instead

$fldwv_date = date(mktime("U")+86400);

to get one day in future ...

thomas
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.