Convert DateTime to String

I need to generate a 14 character string from the current DateTime. I will use this as an index for new created records. I need it in the format:

Year(4),Month(2),Day(2),Hour(2),Minute(2),Second(2)

20070724010101

[231 byte] By [SLDykea] at [2007-11-27 11:35:31]
# 1

http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html

BigDaddyLoveHandlesa at 2007-7-29 17:03:17 > top of Java-index,Java Essentials,New To Java...
# 2

java.text.SimpleDateFormat.

~

yawmarka at 2007-7-29 17:03:17 > top of Java-index,Java Essentials,New To Java...
# 3

Whew! That was tight! I posted and both are replies came up in the redirect!

BigDaddyLoveHandlesa at 2007-7-29 17:03:17 > top of Java-index,Java Essentials,New To Java...
# 4

> Whew! That was tight!

On you like white on rice. Just drafting, you know.

~

yawmarka at 2007-7-29 17:03:17 > top of Java-index,Java Essentials,New To Java...
# 5

> > Whew! That was tight!

>

> On you like white on rice. Just drafting, you know.

>

> ~

I was googling for an amusing list of alternatives to "white on rice",

when I stumbled across this page:

http://en.wikipedia.org/wiki/Bobobo-bo_Bo-bobo

And here I thought I had been hallucinating when I came across "Bobobo-bo Bo-bobo"

on a hotel-room TV late one night.

BigDaddyLoveHandlesa at 2007-7-29 17:03:17 > top of Java-index,Java Essentials,New To Java...