CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Old UnixDate problem, new dummie

Print topic Send  topic

Author Message
mateo
Posted: 09/29/2004, 10:30 PM

Sorry for repeating the similar problem. I just don't know how to solve this.
In order to place abstract from phpBB forum posts to the first page of the site, I wish to show Date field of each post.
phpBB saves all dates into MySql in UNIX format .

I need exact example/instruction/code how.
At the target page simple grid is generated. What exactly should do in addition to label {PostDate}, in order to display normally formated date?

Label: PostDate
Control source type: Database
Control source: post_time
Data Type: ???
Format: ???


(PostDate) Before Show code: ????
peterr


Posts: 5971
Posted: 09/30/2004, 6:04 AM

If you want to set this up globally for all pages/forms/controls then you olnly need to specify:
- in Database Connection -> Server, Date Format = 'yyyy-mm-dd HH:nn:ss' (or whatever format the database is using)
- in Project -> Settings, Date Display Format = (whatever format you want to be displayed)

That's all.

Additionally, if you want to change the display format for any of the controls then specify it in the Format property. The Data Type should be set to 'Date' of course.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
mateo
Posted: 09/30/2004, 3:04 PM

Thank you for your reply Peterr.
Afraid, think you miss the main point. Db field which I wish to show is integer, and contains serial number.. (elapsed number of seconds from some exact datetime. Believe it is 1.1.1970.) This is Unix timedate .
The rest of site is using "normal" MySql date exactly as you point in your post. Everything is fine there.
Date I am talking about is assigned by other application which is out of my control.

However, while reading and showimg up data generated with foreign application my Label value should be changed before show up.

There must be a code which have to convert Unix timedate to Mysql or CCS Date. and then assing Label value to that new timedate, readable by humans.

Mateo
Nizzan
Posted: 10/10/2004, 7:07 AM

Convert it using date php function.

$form->label->SetValue(date("m/d/Y", $form->label->GetValue()));

This will convert epoch time to human readable date format. In this case, it
will show mm/dd/yyyy. Hope this help.


"mateo" <mateo@forum.codecharge> wrote in message
news:5415c82e236505@news.codecharge.com...
> Thank you for your reply Peterr.
> Afraid, think you miss the main point. Db field which I wish to show is
> integer, and contains serial number.. (elapsed number of seconds from some
> exact datetime. Believe it is 1.1.1970.) This is Unix timedate .
> The rest of site is using "normal" MySql date exactly as you point in your
> post. Everything is fine there.
> Date I am talking about is assigned by other application which is out of
my
> control.
>
> However, while reading and showimg up data generated with foreign
application
> my Label value should be changed before show up.
>
> There must be a code which have to convert Unix timedate to Mysql or CCS
Date.
> and then assing Label value to that new timedate, readable by humans.
>
> Mateo
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.