Change date/time format?

Change date/time format?

2
NewbieNewbie
2

    Nov 12, 2004#1

    When I insert the date/time it is formatted as 12/11/2004 12:25PM.

    Help tells me that "The date and time are formatted according to the control panel settings".

    I want to format the date/time in the W3C international standard of 1997-07-16T19:20:30+01:00. Can I do this?

    Marty

    6,680583
    Grand MasterGrand Master
    6,680583

      Nov 12, 2004#2

      It is not possible within the regional and language options of Windows and should also not be done there, because these settings are also used by other applications like Excel for example.

      Better you do it with a UltraEdit template. Look at help of UltraEdit about defining templates and you will find the explanation what options you have to create a customized date/time string.

      Inserting the template can be done with a hotkey or with a toolbar icon, if you assign a hotkey for the template and/or add the template icon to toolbar.

      I use a macro with replaces my two date strings (one in international format in the meta tag and one in German visible for all visitors) with the current date with the help of two templates.
      Best regards from an UC/UE/UES for Windows user from Austria

      2
      NewbieNewbie
      2

        Nov 15, 2004#3

        Thanks...

        601
        Advanced UserAdvanced User
        601

          formatting date and time

          Feb 06, 2006#4

          According to the help file, the date and time (F7) is formatted according to the control panel settings, but I'm not sure if this means Windows CP or not. I don't see any options there to format. Are there options within UE to do this?

          Thanks.

          6,680583
          Grand MasterGrand Master
          6,680583

            Re: formatting date and time

            Feb 06, 2006#5

            Yes, this means the date and time format from Windows Control Panel - Regional and Language Options is used. But you can also define your own date and/or time format for UltraEdit only with the help of templates. See help of UltraEdit about templates.

            2 examples I use daily:

            Template 0 with name "Date German" assigned to hotkey Alt+0 with
            [DATE_USER]dd'.'MM'.'yyyy[DATE_USER_END] produces 06.02.2006.

            Template 1 with name "Date English" assigned to hotkey Alt+1 with
            [DATE_USER]yyyy'-'MM'-'dd[DATE_USER_END] produces 2006-02-06.

            I use this 2 date templates manually with the hotkeys and inside a macro for updating both dates (english in meta description, german visible for the visitors) in my german html pages.
            Best regards from an UC/UE/UES for Windows user from Austria

            601
            Advanced UserAdvanced User
            601

              Re: formatting date and time

              Feb 06, 2006#6

              Thanks again! I was looking at the "Date and Time" in the CP, so I missed the other option.

                Re: formatting date and time

                Feb 06, 2006#7

                Hmmm, follow up question: I see two formats, short and long. UE seems to use the short format. Is there a way to make it use the long?

                6,680583
                Grand MasterGrand Master
                6,680583

                  Re: formatting date and time

                  Feb 06, 2006#8

                  What do you mean with short and long format? Examples please? I think, the format for date and time templates can be set with all possible options or is something missing?
                  Best regards from an UC/UE/UES for Windows user from Austria

                  601
                  Advanced UserAdvanced User
                  601

                    Re: formatting date and time

                    Feb 06, 2006#9

                    In my Regional Settings panel, there are two different options:

                    Short Date: 2/6/2006
                    Long Date: Monday, February 06, 2006

                    And there doesn't seem to be a way to edit them, not that I want to anyway. But I'd like UE to use the long date format (with the time appended) when I insert the date/time, but right now it uses the short date format (with the time appended).

                    P.S. I am first trying to do this without a macro, because if UE uses my Control Panel settings, then why bother with a macro? But if UE only uses the short date format, then I suppose I'll have to use your macro.

                      Re: formatting date and time

                      Feb 07, 2006#10

                      Mofi wrote:2 examples I use daily:

                      Template 0 with name "Date german" assigned to hotkey Alt+0 with
                      [DATE_USER]dd'.'MM'.'yyyy[DATE_USER_END] produces 06.02.2006.

                      Template 1 with name "Date english" assigned to hotkey Alt+1 with
                      [DATE_USER]yyyy'-'MM'-'dd[DATE_USER_END] produces 2006-02-06.
                      What would I use if I wanted to spell out the day and month? And how do I do time?

                      6,680583
                      Grand MasterGrand Master
                      6,680583

                        Re: formatting date and time

                        Feb 07, 2006#11

                        Either your English language skills are not good or you have problems with reading.

                        I have written above, that a TEMPLATE (not macro) can be specified to insert a fully customized date/time string - see menu Advanced - Display/Modify Templates.

                        In the help of UltraEdit click on tab Content, open Menu Commands, open Advanced Menu and click on Display/Modify Templates command. Everything you need is described there.

                        After you have defined your customized date/time template string, open Advanced - Configuration - Key Mapping. Scroll down in the list of commands to EditInsertTimeDate and remove the existing key CTRL+D. Next scroll to InserTemplate0 and assign CTRL+D to your date/time string template.

                        Now you can insert your customized date/time string with CTRL+D which is indepedent from Windows date/time format (used for example by Excel).

                        And you can, but must not use this template also in a macro as I do for my HTML project files. (On save search for existing time strings in the HTML file and if found replace it with current time.)
                        Best regards from an UC/UE/UES for Windows user from Austria

                        601
                        Advanced UserAdvanced User
                        601

                          Re: formatting date and time

                          Feb 07, 2006#12

                          Mofi wrote:In the help of UltraEdit click on tab Content, open Menu Commands, open Advanced Menu and click on Display/Modify Templates command. Everything you need is described there.
                          Thanks, that's what I needed to find.