Solved

Date issue with java script

Posted on 2011-09-11
5
197 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 500 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
String array comparison 4 46
Eclipse for Java EE development 2 45
spring maven example issues 3 44
How to fix  socket closed error 11 32
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …

730 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