maxhugen
Posts: 272
|
| Posted: 10/06/2008, 3:19 PM |
|
I have the same situation as http://forums.yessoftware.com/posts.php?post_id=99320&s_keyword=set+date
I'm trying to set the current datetime in the BeforeUpdate event:
$Component->modified_on->SetValue(date("Y/m/d H:i:s"));
The Connection date format is set to "yyyy-mm-dd HH:nn:ss".
The hidden control 'modified_on' is set to type Date, and I've tried various formats including GeneralDate and "mm/dd/yyyy H:nn".
No matter what I try I get a date of 12/31/1969. This suggests to me that I'm passing the CCS Date control an invalid date...
Can anyone suggest what the problem might be?
MTIA
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
CCSGuy
Posts: 5
|
| Posted: 10/06/2008, 6:18 PM |
|
Try This,
$Component->modified_on->SetValue(strtotime(date("Y/m/d H:i:s")));
I think that may do the trick.
_________________
Continuous effort - not strength or intelligence - is the key to unlocking our potential.
Sir Winston Churchill
|
 |
 |
maxhugen
Posts: 272
|
| Posted: 10/06/2008, 9:31 PM |
|
Many thanks, that worked.
Cheers, Max
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |
jjrjr1
Posts: 942
|
| Posted: 10/07/2008, 6:50 AM |
|
Hi
Check this for additional and undocumented info on CCS dates
http://ccselite.com/forums_topics_view.php?forum_id=8&forum_topic_id=7
_________________
John Real - More CodeCharge Studio Support at - http://CCSElite.com |
 |
 |
maxhugen
Posts: 272
|
| Posted: 10/07/2008, 3:25 PM |
|
Thanks John, some useful info there.
_________________
Max
www.gardenloco.com | www.eipdna.com | www.chrisarminson.com |
 |
 |