5 Replies Latest reply: May 15, 2014 9:55 AM by Bruce _ RSS

    Handling dates

    ndello _

      Hi, I have a report that shows a date like this:

      04 APR 06

      In a template how can I define this as a date?  Character is fine, but because of the spaces I cannot read it as a date.

      I am using version 8.

      Thanks

        • Handling dates
          Grant Perkins

          Works for me provided I have the Input options for dates set to M/D/Y - which I would anyway being in the UK!

           

          If I defined the field as a date field and change the input option to M/D/Y it gives me nothing. - which is probably what you are getting?

           

          The options are saved in the model so will not affect anything else you do unless you save the options setting as the new defaults rather than changing them back before exiting.

           

          HTH.

           

          Grant

          • Handling dates
            ndello _

            Thanks Grant but I am not sure what you mean by input option.  This date field is part of my detail template.

            • Handling dates
              Grant Perkins

              Originally posted by ndello:

              Thanks Grant but I am not sure what you mean by input option.  This date field is part of my detail template. /b[/quote]The menu bar at the top of the Monarch window offer you a sub menu for Options. From the sub-menu pick the "Input" screen and you will see the option to set the default date format.

               

              What you choose will be stored with the model so you can change your default back to whatever you normally need after you have saved the new model.

               

              HTH.

               

               

              Grant

               

              [size="1"][ April 06, 2006, 11:26 PM: Message edited by: Grant Perkins ][/size]

              • Handling dates
                ndello _

                Got it, thanks

                • Handling dates
                  Bruce _

                  Just to add to Grant's excellent answer when you have different types of dates within the same report, or you do not want to change the Monarch defaults as it might upset other reports.

                   

                  In this case you could use CTOD to convert the non-standard date.

                   

                  CTOD converts a string to a date & it's syntax is Ctod(Date,date type), were date type can be "m/d/y", "d/m/y" or "y/m/d".

                   

                  Without this I would have been stuck as I had one report with all three date formats as they were all made in different countries.

                   

                  Cheers

                    smile.gif[/img]