Jump to content

Date Format syntax *solved*


cyprus

Recommended Posts

I am tring to make my dates look easier to read in a list. I have tried the following, as well as numerous permutaions!! Thanks

case 'UnitPrice':$val = '£' . number_format($val,2); break;
case 'Qty':    $val = number_format($val, 0) . ' off'; break;
case 'RunningTotal':      $val = '£' . number_format($val,2);break;
[b]case 'Orderdate':      $val = .date_format(date("j-M-Y", strtotime(['Orderdate']))); break;[/b]

Link to comment
Share on other sites

Thanks again Barand. VB Hat?, so it still shows does it? I wish it was in VB. What you did worked as ever, thanks again. While there, do you know of any packages that enable HTML to be written around PHP. Sorry to admit I normally cheat and use Frontpage to do all the HTML side, ie making pages look smart, and then go into writing the PHP bits so that I can place things in tables. If I work backwards, then I get in a mess and my page gets created in a tabular form, wasted page areas. Thought I would just ask, thanks again.
Link to comment
Share on other sites

I tend to to echo the HTML code from within PHP and avoid wysiwyg editors - I like to be in control.

(I use [url=http://www.nusphere.com]Nusphere PHPEd[/url] - editor, instant manual lookup, code insight, debugger, profiler, edit via ftp, remote debugging, db client interface etc etc.

For tables of data I use my baaGrid class (see my sig, bit like .net datagrid)

include 'baagrid.php';
$grid = new baaGrid("SELECT bla FROM tablename");
    // optional formatting options go here
$grid->display();

Done - instant table, but lots of formatting options too. (End of plug).

I was wondering why you opted for the SELECT to display the returned data rather a conventions table, which would give a far more flexible method of displaying the results?
Link to comment
Share on other sites

Thanks. That Baagrid is something else!! I miss all my VB goodies like Flexgrid etc. Feel almost homesick now. Certanly very useful, probably a bit expensive for light useage. Had I gone the other way, ie insert checkboxes first instead of programatically growing them, I'd know where they were going to appear. Aynhow all good fun if you can survive it. Regards
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.