Schaltfläche - Aktion "Der Tag der Ausführung" erfasst keine Uhrzeit

Hallo,

ich erfasse mit zwei Schaltflächen mit der Aktion “Der Tag der Ausführung” meine Arbeitszeiten an einer Aufgabe. Im letzten Jahr funktionierte diese Aktion tadellos. Nach einer Pause von mehr als einen Monat wollte ich diese Woche meine Arbeitszeiten mit dieser Aktion erfassen, doch nun werden nur der Tag, aber keine Uhrzeit in die Spalten eingetragen (siehe Bild unten).

grafik

Ich benutze die Version SeaTable Cloud. Ist diese Aktion in dieser Version nur eingeschränkt verwendbar?

Vielen Dank für Ihre Unterstützung

Hallo @D_Linz , und willkommen im SeaTable-Benutzerforum! (Entschuldigung, aber meine Deutschkenntnisse enden hier :laughing: )
I created a simple case similar to yours, and encounter the same problem. Here is a small workaround :
you can create two simple scripts :
add start date

const table = base.context.currentTable;
const row = base.context.currentRow;
const now = new Date();

function formatDate(date) {
    return date.getFullYear()+"-"+(date.getMonth()+1).toString()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes();
}

output.text(formatDate(now));
base.updateRow(table, row, {'start date': formatDate(now)});

and add end date

const table = base.context.currentTable;
const row = base.context.currentRow;
const now = new Date();

function formatDate(date) {
    return date.getFullYear()+"-"+(date.getMonth()+1).toString()+"-"+date.getDate()+" "+date.getHours()+":"+date.getMinutes();
}

output.text(formatDate(now));
base.updateRow(table, row, {'end date': formatDate(now)});

As you can see :

  • the scripts are really similar, only the column to update in the last base.updateRow differs
  • I assumed that, like on your screenshot, you use YYYY-MM-DD as date format

Now, you can configure the actions of your buttons to run the appropriate script

buttons

2 Likes

Thank you very much for the quick and comprehensive reply and especially for the solution to my problem. You have helped me a lot. Nevertheless, I am a little sad because an easy-to-learn function with the help of a modular system can now only be used to a limited ability.

We’ll fix it in the next release.

1 Like