?
Solved

Date issue with java script

Posted on 2011-09-11
5
Medium Priority
?
201 Views
Last Modified: 2012-05-12
Hello all I am getting this value 15_D which has a date format. I am placing into a var ret22 and I would like to keep in ret22 with a diffrent format. The currect format is gives me is •MM/dd/yyyy
. I would like to cahnge to •MMMM dd, yyyy

PLease advise what I have to do. Thanks
var ret22 = this.getField("15_D").value;
0
Comment
Question by:eteran
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 47

Expert Comment

by:for_yan
ID: 36519905

What this has to do with Java Programming Language?

And which date it is - is it !5th of December ?
0
 
LVL 47

Expert Comment

by:for_yan
ID: 36520009


You can look at thios date function for formatting date in hjava script:
http://stevenlevithan.com/assets/misc/date.format.js

and description of how to use is here:

http://blog.stevenlevithan.com/archives/date-time-format

But still it is good to know what is "15_D" ?

0
 
LVL 82

Accepted Solution

by:
leakim971 earned 1500 total points
ID: 36520261

var ret22 = this.getField("15_D").value;

var months = [ "January", "February", "March","April","May","June", "July","August","September", "October", "November","December"];
var arr = ret22.split("/");
ret22 = months[ parseInt(arr[0]) ] + " " + arr[1] + "," + arr[2];

Open in new window


A good article about date : http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_484-Can-I-have-a-date.html
Don't forget to vote ;-)
0
 
LVL 82

Expert Comment

by:leakim971
ID: 36520265
@for_yan

We're in Acrobat Javascript world :
15_D is a field in a PDF Form
http://wiki.scribus.net/canvas/How_to_enhance_your_PDF_forms_with_JavaScript
0
 
LVL 47

Expert Comment

by:for_yan
ID: 36520270
I see. Thanks.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses
Course of the Month13 days, 19 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question