CodeCharge Studio
search Register Login  

Visual PHP Web Development

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

YesSoftware Forums -> Archive -> CodeCharge.Discussion

 date format - how to?

Print topic Send  topic

Author Message
Roger
Posted: 05/07/2001, 10:05 PM

In my MySQL table, I have a TIMESTAMP field where it defaults to YYYY-MM-DD.
How do I change this to a different format like mm-dd-yy in CC (when display
in GRID)
Also if I use a normal date field, how do I control the date format (for
input)
How do I apply the Create Validation Rules?

I am using PHP4
--

Rgds
Roger Tng


Alexey Alexapolsky
Posted: 05/08/2001, 2:44 AM

See this example with local date ,
try to use "BeforeShow" event in Form Properties/Events ,
where you can access your time field using fld prefix , for instance field
name is date_entered :

$flddate_entered = date("y-d-M G:i",mktime($datetime["hour"],
$datetime["minute"], $datetime["second"], $datetime["month"],
$datetime["day"], $datetime["year"])) ;
- in Form/Properties define 'Open' event in the 'Event' tab.
$sSQL = str_replace("my_table.my_field as ",
"dataformatfunction(my_table.my_field) as ", sSQL);


--
Regards,
Alexey
CodeCharge Support



Roger <roger@web4sme.net> wrote in message
news:9d7uqf$qoc$1@mail.tankhill.com...
> In my MySQL table, I have a TIMESTAMP field where it defaults to
YYYY-MM-DD.
> How do I change this to a different format like mm-dd-yy in CC (when
display
> in GRID)
> Also if I use a normal date field, how do I control the date format (for
> input)
> How do I apply the Create Validation Rules?
>
> I am using PHP4
> --
>
> Rgds
> Roger Tng
>
>
>

speakeasy
Posted: 05/14/2001, 5:00 AM

Mind if I follow up on this.
I also use PHP and Mysql,

What I am looking for is a standard way of displaying, and editing dates in
the standard american way.
like mm-dd-yy


thoughout my website. however, the dates being stored in the mysql server
are of a dateformat and codecharge puts them in yyyy-mm-dd by default.


Maybe its right here. but I just dont get it.

Thanks again
Bob Lee
"Alexey Alexapolsky" <alexa@codecharge.com> wrote in message
news:9d8f6m$p9b$1@mail.tankhill.com...
> See this example with local date ,
> try to use "BeforeShow" event in Form Properties/Events ,
> where you can access your time field using fld prefix , for instance field
> name is date_entered :
>
> $flddate_entered = date("y-d-M G:i",mktime($datetime["hour"],
> $datetime["minute"], $datetime["second"], $datetime["month"],
> $datetime["day"], $datetime["year"])) ;
> - in Form/Properties define 'Open' event in the 'Event' tab.
> $sSQL = str_replace("my_table.my_field as ",
> "dataformatfunction(my_table.my_field) as ", sSQL);
>
>
> --
> Regards,
> Alexey
> CodeCharge Support
>
>
>
> Roger <roger@web4sme.net> wrote in message
>news:9d7uqf$qoc$1@mail.tankhill.com...
> > In my MySQL table, I have a TIMESTAMP field where it defaults to
> YYYY-MM-DD.
> > How do I change this to a different format like mm-dd-yy in CC (when
> display
> > in GRID)
> > Also if I use a normal date field, how do I control the date format (for
> > input)
> > How do I apply the Create Validation Rules?
> >
> > I am using PHP4
> > --
> >
> > Rgds
> > Roger Tng
> >
> >
> >
>
>

Thierry B.
Posted: 05/27/2001, 9:13 PM

Dans l'article <alexa@codecharge.com>, "Alexey Alexapolsky" nous
disais...
> > - in Form/Properties define 'Open' event in the 'Event' tab.
> > $sSQL = str_replace("my_table.my_field as ",
> > "dataformatfunction(my_table.my_field) as ", sSQL);

Where do you put your dataformatfunction function ? (I mean in CC)
--

Thierry B.
thierry.bo@NOSPAMnetcourrier.com
---------------------------------------------------------------------
Email/Mél :REMOVE/ENLEVER "NOSPAM" from Email to answer/de l'Email pour
me répondre
---------------------------------------------------------------------

   


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.