thierry
|
| Posted: 07/02/2002, 9:39 AM |
|
i need some indications i can't find an appropriate date in CCS within
mYSQL.the format in mysql is y-m-d and in CCS there is no one how to do
and how to add php code in ccs?
great thanks
|
|
|
 |
Chris K.
|
| Posted: 07/02/2002, 9:52 AM |
|
There are 3 places to check date format is valid.
1. Check Project Settings and set Date Display Format.
2. Check Connection Properties and set Date Format.
3. Check Format property of your date displaying controls.
Setup those to match your database format.
|
|
|
 |
Nicole
|
| Posted: 07/03/2002, 2:10 AM |
|
Thierry,
If you use PHP, mysql or postgreSQL , you should specify
"Date format" property in Connection/Server tab that matches db date format.
This format is required because type of datefields is timestamp,
this info is required for timestamps to work properly.
Moreover on the forms you should select different DBFromat on the form for different type fields. Once form is created please check following settings on Data tab:
DataType: Date
Format (display format): select one you like
DBFormat: should match db date format. Select one from dropdown list or type it manually (in case there's no desired format in drop down ).
Note, that on record form you should enter dates in displaying format, then it will be converted to selected db format before inserting to db.
|
|
|
 |
Florent GHEROLD
|
| Posted: 07/03/2002, 2:31 AM |
|
Je te la fait en francais :
Sur ce forume de toute maniere il y a 80 % de mec qui racontent des conneries ca devien une reelle perte de temps. Des fois je me demande si il ne sont pas paye pas Vivendi ! Bref voila la solution j'ai eu le meme probleme que toi hier:
tu mets ca dans module/function
function showdbdate($field)
{
$day = substr($field, 8, 2);
$month = substr($field, 5, 2);
$year = substr($field, 0, 4);
$field= $day . "-" . $month . "-" .$year;
return $field;
}
//insert update format 00-00-0000 to db as format 0000-00-00
function dbdate($field)
{
$day = substr($field, 0, 2);
$month = substr($field, 3, 2);
$year = substr($field, 6, 4);
$field= $year . "-" . $month . "-" .$day;
return $field;
}
tu mets ca dans les proporetes de ta grille avec la date correspondant dans l'evenement befor show
$fldyour_date_field= showdbdate($fldyour_date_field);
tu mets ca dans ton record pour inverser la date avant l'insertion evenement before insert et before update
$fldyour_date_field=dbdate($fldyour_date_field);
Salut
Florent
J'ai une demande a tye faire repond voir a ma demande juste au dessus de la tienne a propos du upload de fichier en php mysql
Bye 
|
|
|
 |
|