Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index


Hallo,

das Beispiel "ExampleUSDate" für "Mid" soll wohl "MM-DD-YYYY" umwandeln in "DD/MM/YYY", erzeugt aber "-Y/YY/MM-D".

Gruß
Hans-Werner

[0]  LO 5.3.4.1 (x64) @ Windows 7 Home Premium (x64)

[1] Fehlerhaftes (Original-) Makro

Sub ExampleUSDate
Dim sInput As String
Dim sUS_date As String
sInput = InputBox("Geben Sie bitte ein Datum im englischen Format MM-DD-YYYY ein")
sUS_date = Mid(sInput, 6, 2)
sUS_date = sUS_date & "/"
sUS_date = sUS_date & Right(sInput, 2)
sUS_date = sUS_date & "/"
sUS_date = sUS_date & Left(sInput, 4)
MsgBox sUS_date
End Sub

[2] Korrigiertes Makro

Sub ExampleUSDate_KORRIGIERT
Dim sInput As String
Dim sUS_date As String
sInput = InputBox("Geben Sie bitte ein Datum im englischen Format MM-DD-YYYY ein")
sUS_date = Mid(sInput, 4, 2)
sUS_date = sUS_date & "/"
sUS_date = sUS_date & Left(sInput, 2)
sUS_date = sUS_date & "/"
sUS_date = sUS_date & Right(sInput, 4)
MsgBox sUS_date
End Sub


--
Liste abmelden mit E-Mail an: users+unsubscribe@de.libreoffice.org
Probleme? http://de.libreoffice.org/hilfe-kontakt/mailing-listen/abmeldung-liste/
Tipps zu Listenmails: http://wiki.documentfoundation.org/Netiquette/de
Listenarchiv: http://listarchives.libreoffice.org/de/users/
Alle E-Mails an diese Liste werden unlöschbar öffentlich archiviert

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.