Announcement

Collapse
No announcement yet.

Why this code doesn't work?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Why this code doesn't work?

    Hi, Forum, I used this code but doesn't work:

    Code:
    Folder.Create(_DesktopFolder.."\\List_"..System.GetDate(DATE_FMT_EUROPE).."\\Data\\");
    This works perfectly instead:
    Code:
    Folder.Create(_DesktopFolder.."\\List_"..System.GetDate(DATE_FMT_ISO).."\\Data\\");
    Some help?
    Thanks

  • #2
    And with "doesn't work" you mean...?

    I think that it "works", but perhaps not in the way as you intended. European dates use the slash character as a separator for day, month and year, while the ISO date uses the dash. The ISO date will result in a single folder name, while the European format will create sub folders for the month and year.

    Ulrich

    Comment


    • #3
      Ah ok, I understand now. The fact is that I need to create a folder with that name and current date but in DD MM YYYY and not in YYYY MM DD format.
      Could you suggest me the right code to do this?

      Thank you Ulrich.

      Comment


      • #4
        I suppose you are looking for something like this then:
        Code:
        [COLOR="#008000"]-- with spaces[/COLOR]
        Folder[COLOR="#FF0000"].[/COLOR]Create(_DesktopFolder [COLOR="#FF0000"]..[/COLOR] [COLOR="#800080"]"[COLOR="#800080"]\\[/COLOR]List_"[/COLOR] [COLOR="#FF0000"]..[/COLOR] [COLOR="#0000FF"]os.date[/COLOR]([COLOR="#800080"]"%d %m %Y"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]os.time[/COLOR]()) [COLOR="#FF0000"]..[/COLOR] [COLOR="#800080"]"[COLOR="#800080"]\\[/COLOR]Data[COLOR="#800080"]\\[/COLOR]"[/COLOR])[COLOR="#FF0000"];[/COLOR]
        [COLOR="#008000"]-- with dashes[/COLOR]
        Folder[COLOR="#FF0000"].[/COLOR]Create(_DesktopFolder [COLOR="#FF0000"]..[/COLOR] [COLOR="#800080"]"[COLOR="#800080"]\\[/COLOR]List_"[/COLOR] [COLOR="#FF0000"]..[/COLOR] [COLOR="#0000FF"]os.date[/COLOR]([COLOR="#800080"]"%d-%m-%Y"[/COLOR][COLOR="#FF0000"],[/COLOR] [COLOR="#0000FF"]os.time[/COLOR]()) [COLOR="#FF0000"]..[/COLOR] [COLOR="#800080"]"[COLOR="#800080"]\\[/COLOR]Data[COLOR="#800080"]\\[/COLOR]"[/COLOR])[COLOR="#FF0000"];[/COLOR]
        Ulrich

        Comment


        • #5
          Thank you so much, it is perfect for my needs!

          Comment

          Working...
          X