Insert a long formatted datetime into Netbeans

Hi.

Third day on the job using NetBeans IDE 7.1 RC2 (Build 201111302200).

Trying to find out how to insert the long format date time into code for a comment.

I've found the macro "insert-date-time" but it inserts a short date time.

Like ...

1/4/12 10:06 PM

Which is absolutely useless to anyone.

I want ...

2012-01-04 22:06

Can't find ANY documentation on NetBeans macros (other than they exist).

Any ideas?

Richard.

LVL 40
Richard QuadlingSenior Software DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Richard QuadlingSenior Software DeveloperAuthor Commented:
There is a keymap available (rather than using a macro with a keymap), but it inserts the same format.

How do I change the format?
0
for_yanCommented:
I'm not sure how to do it in Netbeans, but if that is really important for you and if you are using netbeans with windows, one way to accomplish it is to write a simple, say java program which would put current date-time in desired format into clipboard, associate its execution with some shortcut and then you'll be able to paste date-time in any format into our code using first that shortcut and then ctrl-V.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Richard QuadlingSenior Software DeveloperAuthor Commented:
I'm sorry. I didn't mention. I'm now on a MacBook Air.

This is my third day on the job and the first day I've not turned on my Toshiba Windows 7 PC (it is feeling very unloved!).

I still brought it to work, but I don't use NetBeans on Windows. Only on Mac.

0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.