Hello, does anybody know if it's possible to get a time-stamp to be recorded and then accessed in single and list views on when a database entry was submitted?
I know there is a 'date' field but I'd like the time-stamp to be un-editable by the submitter.
I'd love to hear an answer to this one too if anyone has done something similar!
Hello Dayle,
When I working on creating a document sharing database preset, I came upon the same issue.
I have requested this feature in the tracker: MDL-13191
Here is one work around:
1. Create a Date field
2. Go to the add template
3. Disable Editor (button on the left, gray)
4. Change the following code:
To this:
This edit will make the date submitted field disappear on the add entry. It uses CSS to hide the field. Since the date field defaults to the day and is only hidden, it will be submitted with the date of submission.
Note:
This work around is not perfect because if your students are tech savvy they could either disable CSS or use FireBug to edit the CSS.
Hope this helps,
Rowan
When I working on creating a document sharing database preset, I came upon the same issue.
I have requested this feature in the tracker: MDL-13191
Here is one work around:
1. Create a Date field
2. Go to the add template
3. Disable Editor (button on the left, gray)
4. Change the following code:
To this:
<tr style="display:none;">
<td valign="top" align="right">Date Submitted:
</td>
<td>Date Submitted
</td>
</tr>
<td valign="top" align="right">Date Submitted:
</td>
<td>Date Submitted
</td>
</tr>
This edit will make the date submitted field disappear on the add entry. It uses CSS to hide the field. Since the date field defaults to the day and is only hidden, it will be submitted with the date of submission.
Note:
This work around is not perfect because if your students are tech savvy they could either disable CSS or use FireBug to edit the CSS.
Hope this helps,
Rowan
Hi Rowan,
Thanks for the date field workaround, I have put it to use
Look forward to a better solution with time stamp in the future.
Cheers,
Dayle
Thanks for the date field workaround, I have put it to use
Look forward to a better solution with time stamp in the future.
Cheers,
Dayle
Dayle,
now that's officially supported via the ##timeadded## and ##timemodified## tags - see MDL-9758.
now that's officially supported via the ##timeadded## and ##timemodified## tags - see MDL-9758.
Hi Dayle, Hi Rowan,
Is there also a Hack to format the displaying of the Date field in the database templates, e.g. instead of 28 February 2008 -> 28.02.2008
Thanks a lot, Rosario
Hi, here is my solution, to display date-fields in the desired format:
- copy/paste the javascript function in the attachment into the javascript Tab of the template
- call this function with "DATE" placeholder as parameter where you want your date to be printed in your template
Where your template has:
<tr>
<td valign="top" align="left">Date
</td>
<td align="left">Date
</td>
</tr>
Replace it with your call and the correct script language tag:
<script.... "javascript">
<!--
document.write(getMyDate("Date"));
-->
</script>
Any hints and comments are still appreciated, Rosario
Hi Rosaria,
thanks for the script. As I'm austrian it might be helpful in the future.
Best luck for your projects!
David
thanks for the script. As I'm austrian it might be helpful in the future.
Best luck for your projects!
David
Ciao Rosario 
Thanks a lot for this code ! there is one issue though, I used
<script type="text/javascript">
<!--
document.write(getMyDate("Date Submitted"));
-->
</script>
and your javascript code
but the date spelled out
22..02.2010
and I had to change the last line of your code like :
return (" " + day + "" + month + "." + year);
it does work alright now but I cannot explain this doubling of the "day point"
can you explain this ?
mit herzlichem Gruss
Andy

Thanks a lot for this code ! there is one issue though, I used
<script type="text/javascript">
<!--
document.write(getMyDate("Date Submitted"));
-->
</script>
and your javascript code
but the date spelled out
22..02.2010
and I had to change the last line of your code like :
return (" " + day + "" + month + "." + year);
it does work alright now but I cannot explain this doubling of the "day point"
can you explain this ?
mit herzlichem Gruss
Andy