> I don't know if MS Access will behave the same, but in MySQL you can
> have a query like so:
>
> SELECT *, DATE_FORMAT(end_date, '%d %m %Y') as end_date_formatted FROM
> projects;
>
> And it will retrieve all columns from your projects table, plus the
> extra one you've created on the fly, and it
On Wed, April 19, 2006 9:38 am, Bing Du wrote:
>> Do the search as Richard suggested.
>>
>> MS Access might have a similar function you can use, but you'll need
>> to do some searching yourself to find the answer.
>>
> Sure. I always appreciate various opinions. I've checked with an
> Access
> ex
I don't know if MS Access will behave the same, but in MySQL you can
have a query like so:
SELECT *, DATE_FORMAT(end_date, '%d %m %Y') as end_date_formatted FROM projects;
And it will retrieve all columns from your projects table, plus the
extra one you've created on the fly, and it will be named
> Do the search as Richard suggested.
>
> MS Access might have a similar function you can use, but you'll need
> to do some searching yourself to find the answer.
>
Sure. I always appreciate various opinions. I've checked with an Access
expert. It can be done for Access like Format([DateFieldNam
On 4/14/06, Bing Du <[EMAIL PROTECTED]> wrote:
> > While all the data-munging in PHP is very interesting...
> >
> > Might I suggest that you just use MySQL's date_format() function to
> > ask MySQL to give you the data you want in the first place?
> >
> > Some purists would claim that the database
> While all the data-munging in PHP is very interesting...
>
> Might I suggest that you just use MySQL's date_format() function to
> ask MySQL to give you the data you want in the first place?
>
> Some purists would claim that the database is not the place to put
> presentation logic, of course.
>
On Thu, April 13, 2006 9:30 am, Bing Du wrote:
> $qry = odbtp_query("SELECT end_date,title,projectID FROM projects
> ORDER
> BY end_date DESC");
While all the data-munging in PHP is very interesting...
Might I suggest that you just use MySQL's date_format() function to
ask MySQL to give you the
> I expect there's actually several ways, although I'm thinking it's likely
> that none of them is blindingly obvious. Personally, I think I'd be
> inclined to do it like this:
>
>$mth = 9;
>echo date('F', mktime(12,0,0, $mth));
>
Interesting. Thanks a bunch for the tip, Mike. Appreciat
On 13 April 2006 17:08, Bing Du wrote:
> > Hi!
> >
> > Bing Du wrote:
> > > Excellent! Yes, it now does give me a clue to see what's
> > > actually in the object. print_r($rec[0]) shows:
> > >
> > > stdClass Object ( [year] => 2005 [month] => 8 [day] => 31 [hour]
> > > => 0 [minute] => 0 [seco
> Hi!
>
> Bing Du wrote:
>> Excellent! Yes, it now does give me a clue to see what's actually in
>> the
>> object. print_r($rec[0]) shows:
>>
>> stdClass Object ( [year] => 2005 [month] => 8 [day] => 31 [hour] => 0
>> [minute] => 0 [second] => 0 [fraction] => 0 )
>>
>> I've never dealt with objec
> I hate list. each to his own :-)
>
> try this (untested):
>
> list($year,$month,$day,$hour,$minute,$second,$fraction) =
> array_values(get_object_vars($rec[0]));
>
Magic! That works. In this case, I'd like to use list because I can use
the vars directly (e.g. $year) rather than $arr['year'].
Hi!
Bing Du wrote:
Excellent! Yes, it now does give me a clue to see what's actually in the
object. print_r($rec[0]) shows:
stdClass Object ( [year] => 2005 [month] => 8 [day] => 31 [hour] => 0
[minute] => 0 [second] => 0 [fraction] => 0 )
I've never dealt with object in PHP. Something new
Bing Du wrote:
apparently $rec[0] is a php object - try the following lines to
find out what's inside:
echo '';
print_r($rec[0]);
echo '';
that will probably give you a clue as to how to extract some
useful info from the object.
Excellent! Yes, it now does give me a clue to see what's actua
> apparently $rec[0] is a php object - try the following lines to
> find out what's inside:
>
> echo '';
> print_r($rec[0]);
> echo '';
>
> that will probably give you a clue as to how to extract some
> useful info from the object.
Excellent! Yes, it now does give me a clue to see what's actually
Bing Du wrote:
Hello,
We have a website which pulls data from its MS Access backend database and
publishes the data using Cold Fusion.
The Cold Fusion code has '#DateFormat(end_date, "Mmmm d, ")#'.
'end_date' is a table column of type DATETIME in the Access DB.
Now, we need to use PHP ins
Hello,
We have a website which pulls data from its MS Access backend database and
publishes the data using Cold Fusion.
The Cold Fusion code has '#DateFormat(end_date, "Mmmm d, ")#'.
'end_date' is a table column of type DATETIME in the Access DB.
Now, we need to use PHP instead of Cold Fusi
16 matches
Mail list logo