
greengraduate
Posts: 6
|
| Posted: 07/23/2006, 11:27 PM |
|
Hi,
When I do not add a date or add 00/00/0000, the date is saved as 01/00/0000. I would like it to be saved as 00/00/00 or not saved at all (which has the same effect). I do not see how 01/00/0000 is correct.
Any ideas of where to change this in CC. Hopefully a central point so that it has an effect on all scripts?
Thanks.
_________________
'The only constant thing about software is change' - ? |
 |
 |
matheus
Posts: 386
|
| Posted: 07/24/2006, 7:48 AM |
|
Which DB? Which language?
_________________
Matheus Trevizan
Dynamix Software Ltda.
Blumenau SC Brasil
www.dynamix.com.br |
 |
 |
DonB
|
| Posted: 07/24/2006, 7:12 PM |
|
**CRINGE**. Store a NULL if there's no date. Putting bogus data into your
database is a very poor practice. You can always implement a 'default'
value in places where the date field might be displayed, so that an empty
field isn't shown to users.
Otherwise, you will probably run into further problems as the invalid 'date'
can't be reliably formatted later on when it's being displayed. Then you
have a second problem that needs fixing.
--
DonB
http://www.gotodon.com/ccbth
"greengraduate" <greengraduate@forum.codecharge> wrote in message
news:244c46859d066c@news.codecharge.com...
> Hi,
>
> When I do not add a date or add 00/00/0000, the date is saved as
01/00/0000. I
> would like it to be saved as 00/00/00 or not saved at all (which has the
same
> effect). I do not see how 01/00/0000 is correct.
>
> Any ideas of where to change this in CC. Hopefully a central point so that
it
> has an effect on all scripts?
>
> Thanks.
>
>
> _________________
> 'The only constant thing about software is change' - ?
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
greengraduate
Posts: 6
|
| Posted: 07/25/2006, 1:18 AM |
|
PHP and MySQL, thanks matheus.
"Store a NULL if there's no date", - DonB
Thanks. I have found that I have had to relearn a lot of things, and this one was just one of them. I changed the date fields to allow NULL, and it works fine.
Thanks.
_________________
'The only constant thing about software is change' - ? |
 |
 |
|

|
|
|
|