1 2 Previous Next 20 Replies Latest reply on Aug 13, 2014 11:45 AM by RobMacy

    Removing backSLashes from the date

    RobMacy

      Title

      Removing backSLashes from the date

      Post

           Is there some way to remove the back slashes from dates?  Id like to end up with 08  11 2014

        • 1. Re: Removing backSLashes from the date
          philmodjunk

               You can specify that as a custom data format using the controls at the bottom of the Inspector's data tab.

          • 2. Re: Removing backSLashes from the date
            RobMacy

                 Under Data format? There i only have the format pullDown and No options available

            • 3. Re: Removing backSLashes from the date
              philmodjunk

                   Is your field of type date?

                   Did you click to select that field before trying to use this part of the Inspector?

                   If the field is of type date (not text or number) and you have selected it, the calendar formatting control will not be greyed out as shown in your screen shot and then you can click that button to see a list of custom date formatting tools appear in this part of the inspector.

              • 4. Re: Removing backSLashes from the date
                RobMacy

                     Thanks PMJ.  Im having a strange prob with this one.  I have two fields BrokeDate(repeating field for spacing purposes, and DateBrake an automatic date field to feed to BrokeDate repeating field.

                      

                     The code in broke date is :

                     Middle ( Extend ( DateBrake ) ; Get ( CalculationRepetitionNumber ) ; 1 )

                     ANd I getting the following (BTW the DateBrake field will not be visible but is there for test)

                • 5. Re: Removing backSLashes from the date
                  RobMacy

                       I also tried custom data on DateBrake(so no back slashes)

                  • 6. Re: Removing backSLashes from the date
                    symbister

                         you may be able to use a combination of Substitute and a mask:

                         DisplayDate = Replace (Replace (Replace (Replace (Replace (Substitute(YourDateField; "/"; " "); 2 ; 0 ; " " ) ; 6 ; 0 ; " ") ; 10 ; 0 ; " ") ; 12 ; 0 ; " ") ; 14 ; 0 ; " ")

                         which initially replaces slashes with spaces, then spaces each digit, you will have to then try different fonts to 'fit' your form field

                          

                    • 7. Re: Removing backSLashes from the date
                      philmodjunk

                           The repetitions of your repeating field don't look large enough to display a date. How exactly does this calculation work? Are you trying to split the individual digits of the date field over the repetitions of the repeating field?

                      • 8. Re: Removing backSLashes from the date
                        RobMacy

                             I played with the size of the field and the font and that did not change the question he idea of the two fields is to establish the date in one and then brake it up into the individual repeating fields for spacing.  I didn't know if I could just put the date directly into the repeating fields or not..

                              

                             Funny thing, when I set BrokeDate format to Number(rather than date) it comes out looking like a date with back slashes

                        • 9. Re: Removing backSLashes from the date
                          philmodjunk

                               We discussed the process of breaking up the individual characters of a field in another thread and Raybaudi schooled both of us as I recall.

                               We just need to feed in a line of text consisting of only the digits of your date into that calculation and your example includes a leading zero.

                               Right ( "0" & Month ( YourDateField ) ; 2 ) & Right ( "0" ; Day ( YourDateField ) ) & Year ( YourDateField )

                               If you don't care about leading zeroes:

                               GetAsNumber ( GetAsText ( YourDateField ) )

                               Would do the trick.

                               I think something like:

                               Let ( t = Right ( "0" & Month ( YourDateField ) ; 2 ) & Right ( "0" ; Day ( YourDateField ) ) & Year ( YourDateField ) ;

                                      Middle ( Extend ( t ) ; Get ( CalculationRepetitionNumber ) ; 1 )
                                     )

                               Will work.

                          • 10. Re: Removing backSLashes from the date
                            symbister

                                 did you try the mask idea?

                                 13/08/2014 renders as 1 3 0 8 2 0 1 4 using that calc..... I understood that was what was needed to fit onto the pre-printed form..

                            • 11. Re: Removing backSLashes from the date
                              dbail22@comcast.net

                                   Why not calculate the month, day and year in three calculations and use the results to display in fields.

                                   So 4/27/1967 becomes

                                   4

                                   27

                                   1967

                                   or 4 27 1967 or without spaces 4271967. In the last case it could be $variable=(month(datefield)&day(datefield)&year(dayfield)

                                   Your only way to get spacing correctly would be to use mono spaced font with the necessary number of spaces between number.

                              • 12. Re: Removing backSLashes from the date
                                philmodjunk
                                     

                                          did you try the mask idea?

                                     With the digits distributed across the repetitions of a repeating calculation field. Fitting the digits to the form is a very simple process done by resizing the field to fit the form.

                                • 13. Re: Removing backSLashes from the date
                                  RobMacy

                                       @ symbister  Thanks Symbister, I like the sound of your idea but Im still quite new with all this and the replace(replace)replace left me in the dark.

                                  • 14. Re: Removing backSLashes from the date
                                    RobMacy

                                         @ PMJ   Thanks again PMJ  I did drag the scale bars on the first of the repeating fields and made it quite large but the question marks still remained.

                                    1 2 Previous Next