#1
|
|||
|
|||
![]()
I'm a new user and would like to make sure that dates on a certain document are displayed as follows: January 3, 2010. I don't want 01/03/10 or any version of that kind of date display.
What would be the best way to go about this? I'm not sure and this is my first document. Any advice? Last edited by keangirl; March 29th, 2010 at 01:40 PM.. |
#2
|
|||
|
|||
![]()
It would be easy enough to create a JS rule that would convert data from the mm/dd/yy format to a "longhand" format, but not as easy if data is received in a different format from record to record.
Will all data be received in the mm/dd/yy format? As opposed to the following scenario: R1 - 01/03/10 R2 - January 3, 2010 R3 - January 3rd 2010 R4 - Jan 3, 2010 R5 - 1.3.10 etc... |
#3
|
|||
|
|||
![]()
I'm wondering if I should not allow the users to input a date but rather select from a calendar and have that date popluate into the document in the specific format I'm wanting. It seems easier to control the input that way but I'm not exactly sure how to go about that. Its been too long since my training at Printable and there are huge gaps in my notes. I've looked through the online users guide and the one I got in class but can't find what I'm looking for.
|
#4
|
|||
|
|||
![]()
Are you using MarcomCentral? If so, I would repost this question in that forum since I don't use that specific product.
I would think that you would have the ability when setting up the input fields to require information to be entered in a specific format (i.e. mm/dd/yy validates, but Jan 3, 2010 does not and possibly returns an error message). |
#5
|
||||
|
||||
![]() Quote:
Code:
return FormatDate(Field("YourFieldName", "lm d, yyyy")); As Eric alluded to, the format of the input data field may be significant, but the DateFromString and FormatDate functions should handle most common cases. Although it's always best to avoid any possible ambiguity issues: the most common ones are the good old Y2K bug with two-digit year specifications, and confusion between day and month numbers (e.g. "10/3" is generally understood as October 3rd in the U.S., but as March 10th in the U.K.). Exactly how you would get the input data into a specific format from a user web form is beyond the scope of this forum. As Eric said, if you're asking about MarcomCentral, please post in that forum.
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() |
#6
|
|||
|
|||
![]()
Hey Dan, I am having some trouble formatting some dates. I found this thread and FP seems to think it is ok but is returning the incorrect information. For example:
Using this code: return FormatDate(Field("Field13", "lm d, yyyy")); Field13 being 5/17/2011 FP returns u017efi0e17 Im actually just trying to get it to return the month and day which i believe would be: return FormatDate(Field("Field13", "mm/dd")); Field13 being 5/17/2011 it still returns u017efi0e17 the same thing Any Ideas or suggestions anyone |
#7
|
||||
|
||||
![]()
Your syntax is wrong. The first closing parend needs to go before the comma, like so:
Code:
return FormatDate(Field("Field13"), "mm/dd");
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() |
#8
|
|||
|
|||
![]()
I'm confused, seeing what is written above I put this in:
Quote:
|
#9
|
||||
|
||||
![]() Quote:
Code:
return FormatDate(DateFromString(Field("INJECTION DATE")), "mm/dd/yyyy");
__________________
Dan Korn FusionPro Developer / JavaScript Guru / Forum Moderator PTI Marketing Technologies | Printable | MarcomCentral I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com. Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs. This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data. Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages. Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance. Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support. How To Ask Questions The Smart Way The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript. Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5. return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)}); ![]() |
#10
|
|||
|
|||
![]()
Hey keangirl, not sure if you saw this post or not, or even if you still need it, but this is an awesome library for formatting dates that I use:
http://forums.printable.com/showthre...=8085#poststop
__________________
Mac OS X v10.6.7 FusionPro (Designer/Desktop v7.1P1c) Adobe Acrobat Pro v9.4.5 Adobe InDesign CS5 v7 |
![]() |
Tags |
date, format date |
Thread Tools | Search this Thread |
Display Modes | |
|
|