close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Show/Hide based on Time

Thread began 10/21/2010 6:16 pm by fdotmedia | Last modified 10/25/2010 10:19 am by fdotmedia | 685 views | 5 replies

fdotmedia

Perfect Jason... But I went about it a tad differently...

I wrote this in the recordset above the <html>

SELECT * FROM ClassDetails WHERE NOW() < `CDLastTime`



Therefore I'm only returning the classes that are available...

The problem I'm having now is formatting the output as m/d/Y... Currently I'm using the DATE as the structure of the Row - and it returns yyyy-mm-dd which the manager of the project doesn't want...

When I use the mySQL function DATE_FORMAT() I get the perfect results, but, it removes my additional dynamic rows...

SELECT DATE_FORMAT( CDDate, '%m/%d/%Y' ) AS formatted_date FROM ClassDetails



So... Do I need to add a temp table to output the date to? If I duplicate the recordset and put the DATE_FORMAT() SQL code in it ABOVE the current RS it returns nothing, BELOW it returns the day only...

I've tried pimping the echo $row_ClassDetails['CDDate'] in the loop and have gotten 12/31/1969 returned over how many records there are or nothing...

<?php 
do {
?>
<option value="<?php echo $row_ClassDetails['CDID']; ?>" ><?php echo $row_ClassDetails['CDDate']; ?> <?php echo $row_ClassDetails['CDName']; ?></option>
<?php
} while ($row_ClassDetails = mysql_fetch_assoc($ClassDetails));
?>



I know I'm doing something wrong, I just can't figure it out...

Would it be best to add the DATE_FORMAT() to a recordset above the <html> or write out the php???

I'm lost...

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...