{"id":26193,"date":"2010-01-13T12:14:14","date_gmt":"2010-01-13T16:14:14","guid":{"rendered":"http:\/\/www.bu.edu\/tech\/?page_id=26193"},"modified":"2010-04-20T09:33:38","modified_gmt":"2010-04-20T13:33:38","slug":"date-time","status":"publish","type":"page","link":"https:\/\/www.bu.edu\/tech\/services\/cccs\/websites\/www\/non-wordpress\/marconi\/how-to\/date-time\/","title":{"rendered":"How to Insert Date &amp; Time Information"},"content":{"rendered":"<p>You can automatically use PHP-formatted date and time information from the web server. To do so, you must first convert PHP-derived time and date information into a Telegraph field using the <strong>field<\/strong> directive:<\/p>\n<p><code>&lt;directive action=\"field\" name=\"<strong>new-field-name<\/strong>\" value=\"<strong>profile-field-name<\/strong>\" \/&gt;<\/code><\/p>\n<ul>\n<li>Example:<br \/>\n<code>&lt;directive action=\"field\" name=\"time-and-date\" value=\"[timestamp:date] - [timestamp:time]\" \/&gt;<\/code><\/li>\n<\/ul>\n<p>A complete list of available timestamps:<\/p>\n<table border=\"0\">\n<tbody>\n<tr>\n<th>Field Name<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>[timestamp:date]<\/td>\n<td>The date (&#8220;9 August 2007&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:time]<\/td>\n<td>The time (&#8220;9:34 AM&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:miltime]<\/td>\n<td>24-hour time (&#8220;09:34&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:day]<\/td>\n<td>The day of the month (&#8220;9&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:DD]<\/td>\n<td>The two-digit day of the month (&#8220;09&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:month]<\/td>\n<td>The name of the month (&#8220;August&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:MM]<\/td>\n<td>The two-digit number of the month (&#8220;08&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:mon]<\/td>\n<td>The three-letter abbreviation of the month (&#8220;Aug&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:year]<\/td>\n<td>The four-digit year (&#8220;2007&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:YYYY]<\/td>\n<td>The four-digit year (&#8220;2007&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:YY]<\/td>\n<td>The two-digit year (&#8220;07&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:weekday]<\/td>\n<td>The full name of the day of the week (&#8220;Thursday&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:shortday]<\/td>\n<td>The three-letter abbreviation of the day of the week (&#8220;Thu&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:hour]<\/td>\n<td>The one-digit hour (&#8220;9&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:hh]<\/td>\n<td>The two-digit hour (&#8220;09&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:minute]<\/td>\n<td>The current minutes of the hour (&#8220;34&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:mm]<\/td>\n<td>The current minutes of the hour (&#8220;34&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:ss]<\/td>\n<td>The current seconds of the minute (&#8220;41&#8221;).<\/td>\n<\/tr>\n<tr>\n<td>[timestamp:ampm]<\/td>\n<td>&#8220;AM&#8221; or &#8220;PM<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>You can automatically use PHP-formatted date and time information from the web server. To do so, you must first convert PHP-derived time and date information into a Telegraph field using the field directive: &lt;directive action=&#8221;field&#8221; name=&#8221;new-field-name&#8221; value=&#8221;profile-field-name&#8221; \/&gt; Example: &lt;directive action=&#8221;field&#8221; name=&#8221;time-and-date&#8221; value=&#8221;[timestamp:date] &#8211; [timestamp:time]&#8221; \/&gt; A complete list of available timestamps: Field Name Description&#8230;<\/p>\n","protected":false},"author":1282,"featured_media":0,"parent":26082,"menu_order":8,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/26193"}],"collection":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/users\/1282"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/comments?post=26193"}],"version-history":[{"count":9,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/26193\/revisions"}],"predecessor-version":[{"id":26199,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/26193\/revisions\/26199"}],"up":[{"embeddable":true,"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/pages\/26082"}],"wp:attachment":[{"href":"https:\/\/www.bu.edu\/tech\/wp-json\/wp\/v2\/media?parent=26193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}