Copy link to clipboard
Copied
Hello Everyone,
I am taking a Dreamweaver class and the Instructor is showing us how to insert the date using the Insert Panel. The Date feature is not on the Insert Panel for HTML; however, on the menu bar, I see Insert and HTML. In this window, I see Date but it is grayed out. How do I activate this so that I can complete my assignment? Thanks.
Annette
Hi Nancy,
I am taking an HTML class and using Dreamweaver 2021. I finally figured out the answer. I had been working in Design View and somehow, it was in Live View. You can't find Date in Live View. Thanks for your assistance.
Copy link to clipboard
Copied
Which version of Dreamweaver are you using?
It's a lot more useful to know how to do this dynamically with server-side code than it is with static HTML that never changes. The following example is PHP code. However for this to work, your document must be a .php file hosted on a PHP supporting server.
Current year:
<?php echo date("Y");?>
Tue, Feb 02, 2021:
<?php echo date("D, M d, Y");?>
https://www.php.net/manual/en/function.date.php
This can be done with other programming languages like C#, too.
Copy link to clipboard
Copied
Hi Nancy,
I am taking an HTML class and using Dreamweaver 2021. I finally figured out the answer. I had been working in Design View and somehow, it was in Live View. You can't find Date in Live View. Thanks for your assistance.
Copy link to clipboard
Copied
To my mind, the Insert date feature in DW is about as useful as a rice cooker or iced tea making machine, neither of which I use BTW.
That said, There are things we cannot do in Live View (yet). Design is probably best for most things especially when working with DW's proprietary features -- DW Templates, Library Items, client-side Behaviors...
Live View is good when working with Bootstrap or checking your layout & CSS styles because it's more like a browser.