Returns a formatted date and time based on a given format.
$(EDTIME, time, format-phrase)
Assuming the date is 2009 March 04 09:37:06
| Format phrase | Result | 
|---|---|
| D | 4 | 
| DD | 04 | 
| DDD | Wed | 
| DDDD | Wednesday | 
| M | 3 | 
| MM | 03 | 
| MON | Mar | 
| YY | 09 | 
| YYYY | 2009 | 
| H | 9 | 
| HH | 09 | 
| MM | 37 | 
| SS | 06 | 
| AM/PM | AM | 
| a/p | a | 
| Code | Returns | 
|---|---|
| $(edtime,$(getvar,date),H:MMam/pm) | 09:37am | 
| $(edtime,$(getvar,date),DDD"," DD-MO-YY) | Wed 04-03-09 | 
| $(edtime,$(getvar,date),DDD"," D MON"," YYYY) | Wed, 4 Mar 2009 | 
When format phrase contains text that Diesel cannot interpret, it is displayed literally (e.g. a space, a colon(:)). To use a comma (,) within the format phrase, quote it "," so that Diesel does not read the comma as an argument separator. If any of the “AM/PM” phrases appear in the format phrase, the “H” and “HH” phrases will edit the time according to the 12 hour civil clock (12:00–12:59—1:00–11:59) instead of the 24 hour clock (00:00–23:59)
Supplying 0 as time value will return the current date and time. This avoids the call on $(getvar,date).
| Code | Returns | 
|---|---|
| $(edtime,0,H:MMam/pm) | 09:37am | 
| $(edtime,0,DDD","DD-MONTH-YYYY) | Wed, 4-March-2009 | 
See also...
DIESEL functions| © Menhirs NV. All rights reserved. |