Add a 0 in front of a number

Hello,
I am using a simple expression to make a calendar, going from 1 to 31
Until the number 10 i would like to display a 0 in front of the number.
Unfortunately everything I am trying doesn't work.
Here is the expression:
v=time/thisComp.frameDuration;
t = (v%31)+1;
if (t >0 && t < 10){
value=""+"0"+t;
}else{
value=t;}
I am on AE CC with Mac maverick.
Thanks
NIco

I assume this is being applied to a Text layer?
Your expression seemed to work ok for me, but here's how I would generally do something like this:
v=Math.round(time/thisComp.frameDuration);
t = (v%31)+1;
padLength = 2;
t = t.toString();
while (t.length < padLength) {
          t = "0" + t;

Similar Messages

  • How do I add an area code to a phone number after clicking number in text message?

    Some people send 7 digit phone number in emails and text messages, and I need to add the area code to the front of the number, or else AT&T will choke. I have not found a simple way to do this.
    Current method: copy number to notes, add area code, then paste full number into dialer

    Any carrier in the U.S. will choke unless the number is in your area code.
    I'm not aware of a way to do this. Selecting the number dials the number.

  • Is there a way for users to add products in the front-end using a Web-App?

    I am racking my brains trying to figure out a way to let users add products to the front-end on their own.
    I am building a site for a client who needs users to be able to create there own storefront, kind of like ebay. Here is exactly the functionality I want: Supplier Frontend Products Upload - Magento Connect
    There HAS to be a way to do this with a web app even if it means writing in some code...can anyone suggest a way to do this?

    In short, out of box no, but is possible.
    Solution 1: Hosted on BC, external interface that interfaces with BC API, requires external hosted server.
    Solution 2: Wait until v3 of the API comes out... no timeline from Adobe given. This would remove the need for the external API server.
    Can do both solutions for you but solution 2 wont work until adobe allows it.

  • How to use BAPI to add a new version for a claim number in WTY transaction.

    How to use BAPI to add a new version for a claim number in WTY transaction.
    I am using  function module " BAPI_WARRANTYCLAIM_ADD_VERSION ".
    It needs to copy all contents of previous version to a new version.
    While doing so i am unable to copy fields like valic valoc etc. Any ways by which  i can copy this values.
    WTY will update PNWTYH , PNWTYV and PVWTY tables.
    Thanking you,
    Lokesh.

    Hi Vishnu,
    You can do that through EEWB. Please go through SAP Note 484597. You would get the details of using Easy Enhancement Work bench.
    Rewards point if you think this info is useful
    Regards,
    Dipender Singh

  • Forgetting to enter zeroes in front of the number

    Post Author: ANTJIM
    CA Forum: Deployment
    I am new to CrystalReport XI and any of its versions. How do you write the script so that if enduser forgot to enter zeroes (ie.,00504), the application will know to pull the data on number 504  from {Log.TicketNumber}?  Thanks.

    It just happens on calls.It doesn't cause any issues when calling.I don't 
    store contacts with "+1" in front of their name.Can you ask if it's just a 
    software issue or a carrier issue?
    In a message dated 3/27/2015 9:29:52 A.M. Eastern Daylight Time, 
    [email protected] writes:
             (https://community.verizonwireless.com/)      
    A  message from the Verizon  Wireless Community
    (https://community.verizonwireless.com/) 
          (https://www.verizonwireless.com/wcms/consumer/explore.html)  
    (http://www.verizonwireless.com/wcms/consumer/shop.html)  
    (http://www.verizonwireless.com/b2c/myverizonlp/)   (http://www.verizonwireless.com/support/) 
    I  just bought the Nexus 6.Everytime I go to make a cell or receive a  call
    there's a +1 in front of the number?Any way to turn the +1  off?
    created by Verizon  Wireless Customer Support
    (https://community.verizonwireless.com/people/vzw_customer_support)  in Android - _View  the full
    discussion_ (https://community.verizonwireless.com/message/1239836#1239836)

  • Leading zeroo in front of kunnr number from kna1 after selecting from kna1

    hi
    i and selecting kunnr from kna1 table which is char 10
    i want to place leading zeros in front of customer number after selection from the table
    pls suggest the way to do so
    also let me know the funtion module to remove leading zeros
    regards
    Arora

    hi
    arora
    first export reuired value to fm
    and get the import value into another intermediate varable
    and pass this intermediate variable to the required select statement where condition
    REPORT  zvcrconversionroutines                  .
    PARAMETERS v_matnr LIKE mara-matnr MATCHCODE OBJECT zmara .
    START-OF-SELECTION.
    SELECT SINGLE matnr FROM mara INTO v_matnr
    WHERE matnr EQ v_matnr.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = v_matnr
    IMPORTING
       output        = v_matnr
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
      EXPORTING
        input         = v_matnr
    IMPORTING
       output        = v_matnr
    IF sy-subrc EQ 0.
    WRITE :/1 v_matnr.
    ELSE.
    WRITE: /2 'invilad material'.
    ENDIF.
    reward for use ful points
    regards
    Nagesh.Paruchuri

  • Add Competitor Material via MMW1 but material number exists

    Master Data Experts:
    1. We are adding material type WETT competitor materials via tcode MMW1. However, we have many cases where our competitor number is the same as one of our own existing physically different material numbers. When we try to add the material, we get the hard error message "Specified material already assigned to material type xxxx" and cannot add the competitor material number.
    2. Similarly, we have many cases where more than one of our competitors use the same material number, so we cannot add more than one as a competitor number.
    3. Lastly, we have some competitor material numbers that are more than 18 characters long, and due to the SAP limitation of 18 characters we cannot add these competitor numbers via MMW1.
    These scenarios have never worked before, there is no ABAP related user exits, etc, and no changes done before the problem occurred. We understand that under the single instance system you cannot add the same material number more than once, and we have a company policy system in place so our businesses will not have these material number collisions. However, we cannot control what material numbers our competitors use, so we need some way to remedy this so we can add competitor numbers even though they may already exist.
    Any help that can be given would be appreciated,
    David Bruhn
    Hubbell, Inc.

    Hello James and happy new year.
    Thank you for your answer.
    In fact, I already tried to leave the matnr field with blanks and for a material type which use internal numbers range. I hoped/thought it would have worked as you said but it wouldn't.
    About the external old numbers I keep, I think I don't have to use the field external_number of the E1MARA1 segment, because some of my tests showed me that it works good. Moreover, I don't really understand the reason why this field exists because the field matnr is here for.
    I presume that the external_number is maybe for another use I don't know, aren't you ?
    I've never used this segment for data take over.
    Do you know if the principle you described in your previous mail is also the same to apply to customers & vendors idocs ?
    Best regards.
    David

  • How to add a zero in front of integer?

    i have a value, which is int, retrieve from database
    but now, i wish to add a zero in front of those single digit integer value, can anyone teach me how to do it?

    If you want to display 1 as 01 then one solution is is that yu have to convert it to the string and then display it. you can use this function
    private String convertString(int i)
    if(i<10)
    return "0"+Integer.toString(i);
    else
    return Integer.toString(i);
    i am using this function in my application.

  • How do I add multiple tickets under the same confirmation number from the American Airlines app to Passbook?

    I have a confirmation number from American Airlines for a flight with my family all under my name and for some reason I cannot add all of our tickets to Passbook. To clarify, I went to the American Airlines app and put in the confirmation number along with my name which pulled up my boarding pass only. Although I was able to add this boarding pass to Passbook, I was not able to add any of the other boarding passes for my children to Passbook that should have also been under the flight reservation. In fact I couldn't even see them in the American Airlines app. I tried to use their names and the same confirmation number but nothing happened, and nothing else seems to be working. How can I add all of these boarding passes to my Passbook?

    Fair enough.
    I started doing this before unlimited data and emails on phones was a common commodity, on my Samsung Blackjack.
    I then continued it due to its convenience. My only counter argument is this:
    Even when emails are set to immediately push, I am always notified earlier by this forwarding message (sometimes by several minutes/hours due to the fact that it is not dependent on my being connected to 4G or wifi to receive it.
    Also, to contradict snozdop's point that both methods use data and battery, I say this - when I use the forwarding method, the information comes in a pure text format and therefore uses considerably less information than an HTML and CSS rich email, with embedded images and such -also, unlimited text messages aids curve costs.
    I will, however, give this method a go. In any case, a solution to my original question would still be greatly appreciated.
    Thanks guys.

  • How to get the 0 in front of a number

    I have a table column with number data type. How to get the column including the 0 in the front.
    For example: 066666 i want get 66666, not 066666.
    Thanks.

    Hi,
    Post your query and some data. Seriously. There are a number of different possible explanations, mostly invlolving TO_CHAR or COLUMN. I don't want to write them all, and you don't want to read them all.

  • Re emailing photos from iPhoto: after I create an event, I later add captions, each one beginning with a number. I'd like to email a set of these photos in the order they are captioned, not the original order of the event.  How do I do this?

    I take a number of photos of an event which I download into iPhoto as an Event.  I later add captions to some of the photos in the Event, and I want to share them by email IN THE ORDER OF THE CAPTIONS RATHER THAN IN THE ORDER THEY APPEAR IN THE EVENT.  Each caption begins with a unique number followed by text.  How can I email them in the order of the caption numbers?

    You can't, block capitals notwithstanding. Try using numbered Filenames. But remember how it's all received at the other end is entirely based on the settings on the recipients machine, so it might well be moot.

  • Can you please help me resolve this issue on Batch Management Completion. "Cannot Add row without complete selection of batch number." Message 29-77

    'Another user or another operation modified data, to continue open the window again ' Inventory Transaction Log' (OITL)(ODBC-2039) (Message 131-183). If I click again on add I get the following message : 'Cannot add row without complete selection of Batch / Serial Nos. [Message-29-77]
    Path:
    Inventory -> Item Management -> Batches -> Batch Management - Complete form.
    Before this I use Return Components on Receipts from Production as I am mistakenly issued it more than what was needed.
    Were anyone be able to explain why it worked for certain items  and not for others? I have successfully done  “return components with some batches"

    Hi Nagarajan,
    I'm one of colleague of caterine, we only accessing the batch management-complete window, no other window is open, still the error occurs; see image below
    Before that error occurs(in image); first error we encounter was batch number is already exist, then upon click add another person modified the window; but we tried to restore the db then try to add the batch number in different transaction like SI 1658(Goods Issue), and it is okay.. but on the SI 50003 which is Receipt from production we can't add it.
    Hope you can help us.
    Regards,
    Lean

  • Adding space in front of unique number?

    I downloaded photos from camera and renamed the files with the 'Rename files to:' function.
    How can I add a space between the file name and the unique number which is added to the name? If I write name "On the lake", the filenames will be "On the lake001.jpg". Even when I write "On the lake " (adding an extra space), the filename will be "On the lake001.jpg", as well. Annoying!
    Is there a way to add the space to make the name like "On the lake 001.jpg"?

    Hi Mikail,
    I am sorry but in my case, there is always an underscore that separates the filename and the unique sequence number. I am using PSE 7.
    Which version are you using?
    -Tarun

  • Append 0 in front of a number from 1 to 9

    Hi,
    I am trying to create a textfield that accepts the months of a year expressed in a MM format. The unfortunate thing is that when I go to the Format tab and set the Format category as Number, when I type in 01 representing Jan, it will remove the 0 in front.
    How do I use Javascript to append 0 in front when it is from 1 to 9 and not append when it is from 10 to 12?
    Thanks for reading!

    To fully understand this code you need to be versed in core JavaScript, Acrobat-specific JavaScript and Regular Expressions...
    You can read about JS here:
    https://developer.mozilla.org/en/JavaScript/Reference
    or here:
    http://w3schools.com/js
    Acrobat-specific JS reference can be found here:
    http://www.adobe.com/devnet/acrobat/javascript.html
    There are many excellent tutorials about this subject here:
    http://acrobatusers.com/tutorials
    Here's a short description of what the keystroke code does:
    event.rc is the property of the event object that determines whether or not to accept the keystroke.
    event.change is the value of the keystroke.
    So what this line says is this:
    Accept the keystroke if:
    - It is blank (for example, when the user deletes a character) OR
    - if it is composed of a single digit (expressed with a Regular Expression)

  • When minutes total less than '10' how do I display a '0' in front of the number

    Post Author: Kara
    CA Forum: Formula
    Hi,
    I am using v9. I have written a report that has formulas in it to add two times together giving the total in HH:MM. However, I can't get the total to display correctly if the number of minutes is less than 10. For example: 12 hrs 8 mins is displaying as 12:8 rather than 12:08. My formulas are as follows:
    (Maximum ({JOURNAL.PANELLOCALTZDT}, {Person.PersonID})-Minimum ({JOURNAL.PANELLOCALTZDT}, {Person.PersonID}))*24
    Truncate ({@Hours Worked})
    Remainder ({@Hours Worked},1 )*60
    I have tried using format editor to change the way it displays but this didn't work so I guess there must be something I can change in the formula...
    Anyone got any ideas?

    Post Author: synapsevampire
    CA Forum: Formula
    The trick is to use totext({@yourformula},"00")
    Check this out:
    whileprintingrecords;numberVar dur := datediff("s",{Orders.Order Date}, currentdate); //get the seconds between 2 datesnumberVar hrs;numberVar min;numberVar sec;stringVar hhmmss;hrs := Truncate(Truncate(dur/60)/60);min := Remainder(Truncate(dur/60),60);sec := Remainder(dur,60);hhmmss := totext(hrs,"00") + ":" + totext(min,"00") + ":" + totext(sec,"00");hhmmss

Maybe you are looking for