I needed to pass the current date and time in a particular format in a jmeter webservice call. The format was year month day hour minutes seconds as a numeric and concatentated e.g. 13th Nov 2012 17:00 would by 20121113170000. Luckly the __time function in Jmeter can help . This is the code that I used to generate the date and time.
If you want to save the value as a variable just do the following