I've been doing this for a while now, and everytime I try to make a DefaultValue get a value from an external source (another DataObject), it works fine. Except when I try to get the value from a datetime object. For some reason, it sets the date to 12/31/1969.
{@<projectname>.<dataobjectname>:Field[<Datefieldname>].Value}
The formatting on both fields (the one from the external dataobject, and the on I'm trying to set the defaultvalue) are identical (%m/%d/%Y). Anyone knows whats wrong? |
|||

I did some debuggin. The
I did some debuggin.
The field is indeed returning a string. I created another function to convert it to a date, using the default datetime stamp, and the field still bugs when I try to set it.
My guess is that Datetime controls cannot be set by any means other than manually, at runtime.
What happens when I try to send a datetime stamp is that it writes on the field as if I was passing a string, but does not set the calendar on the side and does not use the formatting specified on the "Format" field, which means I can't use it.
Any thoughts?
Thanks.
Do you mean the value can be
Do you mean the value can be set, but the data format is not right so that the calendar won't popup correctly?
- support
It doesn't matter which
It doesn't matter which format it goes, the value is set as '12/31/1969'. Already tried 'yyyy-mm-dd HH:nn:ss', the american format, the format without the hour and, those same with '/' instead of '-' and a few others, nothing worked. It always goes as 12/31/1969.
I just changed all the datetime controls of my forms (a lot of em) to textboxes, and used a javascript function to format it.
That's my VW_ATENDIMENTOS,
That's my VW_ATENDIMENTOS, so you can understand what I'm doing:
You may want to do some
You may want to do some debugging. Check BizField
public function getProperty($propertyName)
{
$ret = parent::getProperty($propertyName);
if ($ret) return $ret;
if ($propertyName == "Value") return $this->getValue();
return $this->$propertyName;
}
You can find the cause from it.
- support
Can you list your metadata
Can you list your metadata relating to this issue?
- support