bildwelt
E2E FORUM
E2E Bridge E2E Commerce

How can I determine whether it’s the last day of the month?

E2E Forum Modeling & Development How can I determine whether it’s the last day of the month?

This topic contains 0 replies, has 1 voice, and was last updated by  Jürgen 4 years ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #733

    Jürgen
    Moderator

    Use the following snippet:
    // get today
    local today = currentDateTime();

    // calculate tomorrow by adding one day (use type durationStructure)
    create day;
    set day.days = 1;
    local tomorrow = today.add(day);

    // check if tomorrow is first of month
    set lastDayOfMonth = (tomorrow.printLocalDateTimeExpression(“%d”) = “01”);

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.