Hi there,
I have searched through these forums and can't find anyone with the same problem as I am having (probably because I'm just being really dumb).
All I want to do is generate today's date and use this value in a html:text box on a .jsp page.
I can get the date in the form of: Tue Aug 21 15:50:47 BST 2007 by using
<% String currdate = new java.util.Date().toString();%>
But I can't change the date format to just display 21-08-2007.
I know this is going to be something completely simple but I am really new to this and struggling hard.
I have tried:
<% String currdate = new java.text.SimpleDateFormat("ddMMyyyy").toString(); %>
but this just returns: java.text.SimpleDateFormat@c5bfbc60.
Many thanks for taking your time to read this I hope you can help me.
Ben Sayers
Message was edited by:
BenSayers