none
LDDateTime.GetDayName Error RRS feed

  • Question

  • Show NDV862

    The screen showing this:

    Today is Sonntag not Samstag. 


    Best Regards Martin


    • Edited by martmen Sunday, January 11, 2015 12:55 PM
    Sunday, January 11, 2015 12:53 PM

Answers

  • Hallo Martin,

    OADate !!

    Für gleiche Ausgabe (for same output):

    Actual = LDDateTime.Now()
    ActualWochentag = LDDateTime.GetDayName(LDDateTime.NowOADate())
    TextWindow.WriteLine(Actual + " " + ActualWochentag)


    PS: Also nimm entweder LDDateTime.NowOADate() oder LDDateTime.ToOADate(Actual)
    • Edited by Pappa LapubEditor Sunday, January 11, 2015 1:51 PM
    • Proposed as answer by litdevModerator Sunday, January 11, 2015 2:37 PM
    • Marked as answer by martmen Monday, January 12, 2015 12:17 PM
    Sunday, January 11, 2015 1:42 PM
    Answerer
  • Thanks all. My missunderstand was that i don't build the OADate with LDDateTime.ToOADate. I know now who i use the LDDateTime Commands.

    Danke Pappa Lapup für den entscheidenden Tipp.

    Actual = "07.08.2015 15:00:00"          'Set the Date to Actual

    OADate = LDDateTime.ToOADate(Actual)    'build the OADate

    ActualWochentag = LDDateTime.GetDayName(OADate) 'build the weekday

    TextWindow.WriteLine(Actual + " " + ActualWochentag) 'output


    Best Regards Martin


    • Edited by martmen Monday, January 12, 2015 12:16 PM
    • Marked as answer by martmen Monday, January 12, 2015 12:16 PM
    Monday, January 12, 2015 12:13 PM

All replies

  • The Dutch version also is wrong: zaterdag in stead of zondag.

    Jan [ WhTurner ] The Netherlands

    Sunday, January 11, 2015 1:39 PM
    Answerer
  • Hallo Martin,

    OADate !!

    Für gleiche Ausgabe (for same output):

    Actual = LDDateTime.Now()
    ActualWochentag = LDDateTime.GetDayName(LDDateTime.NowOADate())
    TextWindow.WriteLine(Actual + " " + ActualWochentag)


    PS: Also nimm entweder LDDateTime.NowOADate() oder LDDateTime.ToOADate(Actual)
    • Edited by Pappa LapubEditor Sunday, January 11, 2015 1:51 PM
    • Proposed as answer by litdevModerator Sunday, January 11, 2015 2:37 PM
    • Marked as answer by martmen Monday, January 12, 2015 12:17 PM
    Sunday, January 11, 2015 1:42 PM
    Answerer
  • Thanks all. My missunderstand was that i don't build the OADate with LDDateTime.ToOADate. I know now who i use the LDDateTime Commands.

    Danke Pappa Lapup für den entscheidenden Tipp.

    Actual = "07.08.2015 15:00:00"          'Set the Date to Actual

    OADate = LDDateTime.ToOADate(Actual)    'build the OADate

    ActualWochentag = LDDateTime.GetDayName(OADate) 'build the weekday

    TextWindow.WriteLine(Actual + " " + ActualWochentag) 'output


    Best Regards Martin


    • Edited by martmen Monday, January 12, 2015 12:16 PM
    • Marked as answer by martmen Monday, January 12, 2015 12:16 PM
    Monday, January 12, 2015 12:13 PM