CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 problem with last update date

Print topic Send  topic

Author Message
pathans

Posts: 46
Posted: 10/18/2012, 6:41 PM

I am trying to use this function in my page to save last update date.
it works but then it when the date shows up its showing date as something in 1970

DBformat for my table is yyyy-mm-dd HH:nn:ss
filed which is showign date is formatted like mm/dd/yyyy h:nn AM/PM

I want to get current date and time stamp in this example (date and time both)


function LastUpdateInfo(){
global $Tasks;

$Tasks->LastUpdateDate->SetValue(date("m.d.y"));
$Tasks->LastUpdateUserid->SetValue(CCGetUserID());

}

function Tasks_BeforeInsert() {
LastUpdateInfo();
}

function Tasks_BeforeUpdate() {
LastUpdateInfo();
}
View profile  Send private message
pathans

Posts: 46
Posted: 10/19/2012, 11:25 AM

got it working.
just changed it from this
$Tasks->LastUpdateDate->SetValue(date("m.d.y"));

to this
$Tasks->LastUpdateDate->SetValue(time());

and it worked.
View profile  Send private message
bannedone


Posts: 273
Posted: 10/19/2012, 2:10 PM

Good Job

Here is undocumented info on how CCS deals with time values in date controls that might be of value to you in the future.

http://forums.yessoftware.com/posts.php?post_id=97052

_________________
John Real
CodeCharge Studio Support, Training, Consulting, Development, Web based solutions
http://realsites.biz
http://ccselite.com
Other Banned IDs on this Forum. jjrjr1, jjrjr2
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.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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