• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 988
  • Last Modified:

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.

0
Richard Quadling
Asked:
Richard Quadling
  • 2
1 Solution
 
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
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now