Format users date and repopulate

Hi, I've been having a lot of trouble with what is probably a very easy solution. What I am trying to do is create a function which reads a passed in date and either alerts the user with an error message saying the format is wrong, or (preferably) reformats the date and replaces the original.
ie;
Textbox1 : user enters 10/11/2008
Script: converts to dd/mmm/yyyy
Textbox2 now reads 11/OCT/2008
the other format I want to allow is mmm//yyyy (where a month is known but a specific day of the week is not)
only requirement is to check for those 2 formats. I know Adobe allows for validation of a single date format, but unfortunately, I need 2.
please help if you can. thanks

To get some flexability in the validation and formating you definately need to use JavaScript.
To check for three date formats, one correct formats and two for conversion, you'll need to first write Regular Expressions for all three. After this it's a matter of figuring out if the input matches any of these and then applying the appropiate action, either converting, complianing, or doing nothing. All of this can be done from the validate event.
As an alternative, you could use the keystroke event to limit the kinds of input the user can type into the field in the first place.
Here are some articles that are relavant to your task:
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/date_time_part1/
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/formatting_text_field s/
http://www.acrobatusers.com/tutorials/2008/04/text_match_reg_exp/
http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/scripts_form_fields/
You'll also find detailed tutorials on using the Validate and Keystroke events at www.pdfscripting.com
Thom Parker
The source for PDF Scripting Info
www.pdfScripting.com
The Acrobat JavaScript Reference, Use it Early and Often
http://www.adobe.com/devnet/acrobat/

Similar Messages

  • Format of date and numbers

    Hi,
    in Italy the format of date is DD/MM/YYYY e the formato of numbers is NNN,DD (DD means Decimal).
    I use Excel for IPAD but when I write for instance 28/03/2015 the field shows 03/28/2015, the same problem is for numbers where the comma and the dot are inverted.
    How do I change the format of date and numbers?
    Thank you in advance.
    Max

    The general format of the date is tied to the language...use US english, get US date formatting.
    You may want to poke around in excel's settings. I know the desktop version allows you to alter the date formatting, but I'm not sure if the iPad app has that. Look for 'cell formatting' in the settings and see if it's alterable.
    If not, you can try to make your template on a PC, then put that excel onto your iPad and see if it honors the cell formatting already in place.

  • MS Word Web Service Interface: bad format of date and currency fields

    Hi,
    I am using MS Word Web Service interface to create contract documents. However, my date and currency fields show in a strange format. Date is in"YYYY-MM-DD" format, while currencies always have "." as decimal separator (probably technical values). My user settings are "DD.MM.YYYY" for dates and "n.nnn,dd" for decimal numbers.
    My workaround is to create a Z structure for WS interface with char fields and then do conversion through CRM_WST_RT_BADI->OUTBOUND_PROCESSING method. This works, but requires a lot of custom development.
    Is there a way to "tell" the interface to use correct formats in MS Word without doing it all manually through custom fields?
    Thanks!
    KR,
    Igor

    Oh, indeed!
    We might be closer than you think - I live close to Croatian-Slovenian border so we might pop out for a drink! But we can discuss this out of forum... 
    Now work again:
    Is there any documentation on possible formatting keywords? I suppose it's possible to set up decimal places, custom date formats etc.
    Cheers,
    Igor

  • To extend SAP user date and to add months to the current date

    Hi All,
    I need to extent the user date in SAP based on one condition.
    If the condition is true extend the date by 12 monthd if false 6 months from the current date.
    Can i have the FM for user date extentions and FM for getting the date.
    Thanks,
    Chandu.

    Hi ,
    You can use this FM for exteding the date.
    CALL FUNCTION 'BAPI_USER_CHANGE'
        EXPORTING
          username   = us_username
          logondata  = e_bapilogond
          logondatax = e_bapilogondx
        TABLES
          return     = i_return.
    u need to pass date and correspoing flag also.
    For extension of the date by months u can use this FM.
          CALL FUNCTION 'MONTH_PLUS_DETERMINE'
            EXPORTING
              months  = 6 or 12 ( depending up on ur logic)
              olddate = sy-datum
            IMPORTING
              newdate = us_expdate.
    Thanks and regards.
    Sham

  • Formatting by date and price

    Hi I'm having a problem formatting a spreadsheet.
    My spreadsheet has 10 columns and two of these are renewal date and price. 
    I need to format the spreadsheet so that any date before 30 September goes red; before 31 October - another colour; before 30 November - another colour and by 31 December - another colour. 
    Additionally, I need the spreadsheet to organise from the highest price. 
    Ideally it should end up that the earliest and highest price renewal should be at the top and the bottom should be the latest and lowest price (at the end of December). 
    Please can someone help (in simple terms as possible) as to how to do this!
    Many thanks,
    H. 

    Hi,
    According to your description, we need to assign two different conditional formatting rules with column date and column price. Please see the below image:
    ===
    Column Date Rule:
    Format only cells that contain> Cell value less than 2014/9/1> Set format red
    Format only cells that contain> Cell value between 2014/9/1 and 2014/10/1> Set format yellow
    Create multiple rule based on your date.
    ===
    Column Price Rule:
    Format only top or bottom ranked values.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Moving all user data and applications

    Ok,  so my previous problem was moving from an old HD to a new one.  Now I know how to do that by booting to the HD Recovery Disk and using Disk Utility.  The problem I have is that DU won't move my files from the 2TB to the 1TB because it says the 1TB has enough space.  I know for certain that the files on the 2TB are totalling less than 1TB by using "get info."
    So my question is two-fold:
    1.  Why would it not allow me to move it?
    2.  Is there a way to just move the OS, applications, and user information (ie logins, passwords, bookmarks)?  I can manually move the documents, photos, music, and videos to a third hard drive temporarily.  What if I installed OSX Mavericks on the new 1TB hard drive first, could I then port the applications and user info?

    Use Carbon Copy Cloner to migrate an OS or selectively move user files and data to a new drive.
    Depends on what the 1TB drive has on it. DU would not do a smart update, it would want to erase and restore or install a new system. 
    Erase and clone. Or erase and install. Setup Assistant afterwards can import files, but many of us want to isolate the user from the syst em and have each on separate drives, less I/O contention, better performace. One drive does not need to wait on the other.
    How to relocate system and user data to another drive:
    http://support.apple.com/kb/HT4337
    http://chris.pirillo.com/how-to-move-the-home-folder-in-os-x-and-why/
    I would hope folks save the system inst aller first before running the install or update so they don't need to redownload again.
    How to clone your system:
    http://macperformanceguide.com/Mac-HowToClone-backup.html
    http://macperformanceguide.com/Mac-HowToClone.html
    http://www.macupdate.com/app/mac/7032/carbon-copy-cloner
    http://www.macperformanceguide.com/blog/2012/20120711_2-MacPro-internal-clone-ba ckup.html
    Using Cloning as a Backup Strategy
    http://www.bombich.com/
    Create an OS X Lion Install disc
    OS X Lion Install to Different Drive
    How to create an OS X Lion installation disc MacFixIt
    Migration Assistant Update for Mac OS X Snow Leopard
    http://www.apple.com/support/lion/installrecovery/
    http://reviews.cnet.com/8301-13727_7-20080989-263/how-to-create-an-os-x-lion-ins tallation-disc
    http://www.coolestguyplanettech.com/how-to-make-a-bootable-osx-10-8-mountain-lio n-disc-or-drive-from-the-downloaded-mountain-lion-app/

  • Converting zulu format to date and time format

    I want to convert zulu format to regular dateand time format. so for e.g I have this date and time in my table
    021731ZJUN06, I want to convert it to 2006-06-02 17:31:00
    I wrote this in sql server, but don't know how to do this in oracle
    ALTER function [dbo].[ZULUToDateTime](@initDate varchar(20))
    RETURNS datetime
    AS
    BEGIN
    DECLARE @NewDate datetime
    SET @NewDate = NULL
    IF @initDate <> 'false'
    BEGIN
         SET @NewDate=     CONVERT(datetime,LEFT(@initDate,2)+ ' ' + STUFF(right(@initDate,5),4,0,' ') + ' ' +STUFF(SUBSTRING(@initDate,3,4),3,0,':'),121)  
    END
    RETURN @NewDate
    END

    Like this?
    SQL> select to_date('021731ZJUN06', 'ddhh24mi"z"monrr')
      2  from dual;
    TO_DATE('021731ZJUN0
    02-jun-2006 17:31:00Gotta love Oracle's date formatting fuctions :-)
    The format above is my default session format, if you explicitly want the format you showed, you need an extra to_char like:
    SQL> select TO_CHAR(to_date('021731ZJUN06', 'ddhh24mi"z"monrr'), 'yyyy-mm-dd hh24:mi:ss')
      2  from dual;
    TO_CHAR(TO_DATE('021
    2006-06-02 17:31:00John
    Edited by: John Spencer on Nov 10, 2011 1:45 PM
    Added correct output format.

  • Experience updating app, keeping user data, and extending SQLite tables?

    We're updating an application in the App Store, and haven't yet found good information on how to deal with updates to the SQLite Schema and data that should be transferred between apps.
    Anyone successfully done this?
    Q1: Does the old DB files stay on the iPhone after update? Does the installer do a "diff" between them? In our case, we just extended tables, rather than changing them, in hope that we can successfully move the data for users gracefully.
    Q2: If the installer does in fact wipe all the data and files on the app before install, is there a way to access the data before it updates, so the app can gracefully update the data?

    Would you mind sharing your solution?
    I've implemented it by using the PRAGMA SQL statements to query the table structure, and if it's missing the column I need for the new version, adding it.
    The bigger problem, though, is some of my users have experienced their data being deleted when they received an updated version from the app store.

  • Deleted my "microsoft user data" and emptied trash! how to recover!!

    I deleted my "microsoft user data" which contains everything to do with my entourage and then emptied the trash (not secure though). I know what was I thinking....I am running filesalvage. What do i do next in order to recover everything?? thanks!

    First, you need to understand that it's highly unlikely the recovered data will be intact. The longer it's been since you deleted it and the more you've used the computer during that time, the less likely it is that you'll be able to recover 100% of the data.
    This is because it's likely that the computer has written new data over the same sections of the hard drive that the old data used to occupy. This means that you may recover the folder only to find that Entourage tells you the database is "corrupt" or "unreadable" or something similar.
    (Also - I encourage you to switch to Apple Mail and IMAP accounts for your email. Using IMAP, everything stays stored on your server so that you never lose your email, no matter what happens to your computer. For more information, google IMAP and read about it.)
    Having said that, you'll find instructions for how to use FileSalvage at this website, roughly 2/3rds of the way down:
    http://subrosasoft.com/OSXSoftware/index.php?mainpage=product_info&productsid=1
    Good luck!

  • How do i format date and time in SSRS 2008

    Okay, so i am working with SSRS 2008. I am formatting the date and time. Right now the current out put is 1/13/2014 8:02:11 AM. I want the output to
    be 1/13/14 8:02 AM. What is the expression for this? 
    Thanks in advance

    There are 2 functions that can be used, Format and FormatDateTime.
    http://www.jackdonnell.com/?p=122
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Formatting Date and Time in Smartforms.

    Hello,
    I'm a newbie and I'm working with smartforms.
    My requirement is to get the following format of date and time in a text within a template.
    'MMM DD HH:MM'
    Like : Jan 01 12:45
    I have tried SAPScript Commands like 'SET DATE MASK' but that doesn't appear to work.
    Do I have to use a Function Module?
    Please help out. A sample code will be appreciated!
    Regards & Thanks,
    Arun G Nair

    Hi,
    please see this code
    DATA: V_DATE1 TYPE STRING
    SELECT SINGLE LTX FROM T247
       INTO MONTH_NAME
       WHERE SPRAS = SY-LANGU
       AND MNR = SY-DATUM+4(2).
    CONCATENATE MONTH_NAME  SY-DATUM+6(2)  DATE1(4)
        INTO V_DATE1 SEPARATED BY SPACE.

  • Date and time formatting in excel spreadsheet

    Hi:
    When I try to pass the data from jsp to excel , the excel sheet can't publish the date and time in the pattern that I wanted. I used SimpleDateFormat to format the date and time when I passed the data from jsp.
    SimpleDateFormat formatter=new SimpleDateFormat ("MM/dd/yyyy HH:mm:ss a");
    Could anyone tell me a solution.
    Thanks.

    Can you describe your problem a bit more. How are you passing the data, what is the error being seen in excel

  • Pulling my hair out: Change format from date to number format?

    I was recently sent a formatted Excel spreadsheet in which to enter my own numbers.  The format is date and duration, but the last column is the total number of hours and minutes converted into decimals, e.g. 3hrs. 30mins. = 3.5 hours.
    It was going fine until last night when I tried to enter 5:73 as a number, not a duration, but Numbers keeps changing it to 6m 13s.  I've tried changing the format from Duration to Number but although the cell will say 0:00, when I enter the number 5:73 it automatically switches back.
    The weird thing is that it's only happening on about one-third of the cells.  I even cut-and-pasted a section of the spreadsheet that didn't have this problem, cleared the contents and then typed my info into the same lines and rows and it's still doing the same thing.
    How can I see the hidden formatting in Numbers cells to see if I can figure what needs to be changed?
    Thank you.

    Hi Jane,
    dragging on bottom right corner but all that does is increase the range, not the size of the actual cell itself.
    Hover the cursor over the right of a column (Column B in this example) until the cursor becomes a cross with arrows pointing East and West. Drag right to widen the column.
    Or use the Format Panel > Table > Row & Column Size
    (You may have to drag the panel up to see this)
    I really miss in Numbers is being able to edit cell contents in a formula bar.
    Here is the formula bar in Numbers 3.2 after clicking twice on a cell
    The formula bar is moveable. Hover over the left of the bar until the cursor changes to a 'hand' and you can drag it.
    Resize the formula bar by hovering over any edge and drag
    Tricky with a trackpad, easier with a mouse .
    Also, the cell contents appear at bottom left of the Numbers window
    If you prefer Numbers 2.3, I agree it is much more user-friendly version.
    Regards,
    Ian.

  • What happens to my local user data? -newbie question sorry

    Hi All,
    Firstly apologies if this seems a dumb question, I've scoured the forums but I require something that fits my specific situation.
    I've had a (my first) MacBook for about 9 months, built up a fairly healthy local user, setup just how I like it, MobileMe, iTunes, Chrome, iPhoto library, lots of other apps, etc etc and so forth.
    I'm setting up a Mac Mini Server, and was wondering what I can do to join the new server, but take all my settings/downloads/iTunes etc with me... I don't want it all stored on the server, but I come from a Micro$oft Windows background. With MS, when you add a PC to a domain, login with the appropriate user account, you have a fresh profile, no settings, no files, no customisations etc etc is this also the case when I hit that Join Network Account server button on my Mac? Will I get a blank fresh account on my Macbook?
    I'm guessing this must happen quite often as people start their way into Apple technology and build up a nice healthy local account before branching further into the Apple world...

    The two laptops I use everyday have access to all the servers via my network account. It is set so that my user account is listed as having "no home" So I log into the laptop with my local user account with a UID of 501 but access all the network services via the go menu and my network account of the same name but with a UID of 1034.
    For all other users in the company, if they are on a laptop, I use network accounts. The machines are managed to ask if the user wants to create a mobile account when they login. For permanently assigned laptop users, the answer is yes. This puts their home on the laptop and ties them to that machine. I use mobile account syncing to make sure their critical data is copied to the server for backup.
    By having the machine ask to create the mobile account, users can answer no and login to their network home. The use of the laptop may be needed temporarily if a regular workstation is down.
    Once in a while I will need to convert a local account to a network account. While a bit more laborious that setting it up correctly at the beginning, it can be done.
    But I never let any user account have the UID of 501. I would set that up as the local admin account I use for installing updates and performing other maintenance. If needed, I would back up the user data and erase and re-install the OS.

  • Function Modules for Data and Time

    Hi all,
              I need 2 function modules for date and time. when we pass current data(sy-datum) and current time (sy-uzeit) into function modules, shoud get date in <b>dd/mm/yyyy or dd.mm.yyyy</b> and time in<b> HH:MM:SS</b> formats.
    Thanks in advance

    Hi Ranjith,
    i think this will b usefull for you..
    SAP Bar Chart Function Modules and what they are used for
    Function module
    Used for
    BARC_GRAPHIC_PBO
    Starting bar chart at PBO time, using a graphic profile (parameter PROFILE)
    BARC_GRAPHIC_PAI
    Analyzing data returned by the graphic
    BARC_SET_TIME_AXIS
    Setting start and end of time axis
    BARC_SET_OPTIONS
    Setting options
    BARC_ADD_CHART
    Creating a chart
    BARC_SET_CHART_ATTRIB
    Setting chart attributes
    BARC_ADD_SECTION
    Creating a section on the time axis
    BARC_SET_SECTION_ATTRIB
    Setting section attributes
    BARC_ADD_RIBBON
    Adding a ribbon to the time axis
    BARC_SET_RIBBON_ATTRIB
    Setting attributes for ribbons in the chart
    BARC_ADD_GRID
    Adding a time grid
    BARC_SET_GRID_ATTRIB
    Setting grid attributes
    BARC_ADD_LAYER
    Adding a layer (graphic elements)
    BARC_SET_LAYER_ATTRIB
    Setting layer attributes
    BARC_ADD_LINE
    Adding a line
    BARC_ADD_CALENDAR
    Creating a calendar
    BARC_SET_CALENDAR_ATTRIB
    Setting attributes for a calendar
    BARC_ADD_TIME_PROFILE
    Creating time profiles
    BARC_SET_TIME_PROFILE_ATTRIB
    Setting attributes for time profile
    BARC_ADD_INTERVAL
    Adding a time interval
    BARC_SET_INTERVAL_ATTRIB
    Setting time interval attributes
    BARC_ADD_TIME_OBJECT
    Creating a time object
    BARC_CONVERT_DATE
    Creating a date string in bar chart format
    BARC_REVERT_DATE
    Converting a date string in bar chart format to date and time
    BARC_ADD_DATELINE
    Creating a date line
    BARC_SET_DATELINE_ATTRIB
    Setting dateline attributes
    BARC_GET_PROFILE_CONTENTS
    Obtaining profile contents for customizing a chart
    BARC_GET_COLUMN_WIDTH
    Selecting new column width
    BARC_SET_COLUMN_WIDTH
    Setting the column width
    BARC_GET_TEXTINDEX
    Obtaining the text index of a field
    BARC_SET_LABELS
    Positioning the chart display
    BARC_SET_COLUMN_ATTRIB
    Setting column attributes
    BARC_SET_ROW_ATTRIB
    Setting row attributes
    BARC_SET_ROW_HEIGHT
    Setting the line height
    BARC_SET_MAXCHARTS
    Setting the maximum number of charts sent
    <b>If its usefull reward points
    </b>

Maybe you are looking for

  • Graph Annotations - Major Bug !!!!!

    I am using annotations on a NiGraph control(2D, single plot chart). I update the X and Y coordinates of specific annotations using m_Graph.Annotations.Item(item).Caption.SetCoordinates(... , ...) this is done around 3 times per second. Each call to S

  • 10.1.2.0.2 problem

    Hi, I have installed 10.1.2.0.2 infra and mt but on oc4j_portal no applications are loaded, thus portal is not opening. Any clues? Thanks in advance Mak

  • Iweb Blog & FB

    I created a blog with iweb and publish on mobile me with no DSN name registration. FaceBook won't link the url http:/web.me.com/somebodies_name as a valid url. Do I have to do a domain registration for this to work? I create my blogs in pages many of

  • Indesign cc 2014 do not Collect for Output

    indesign cc 2014 do not Collect for Output with mac os x 10.9.4 Any bug?

  • Changing credit card info

    My credit card has expired and I can't get into change the expiration date. I can change the credit card but the month and year I can't change.