I have a client where they want to log certain sequences’ start and stop times.
Some of you have helped me with this already (thanks again).
Now everything is working perfectly except my client wants to add a final touch. They want to make a column “Duration” where the time should be filled in how long the sequence has taken place.
Now my Column “Start time” and “Stop time” are both defined as varchar(max) inside the SQL DB. The value I write inside the query is “current_timestamp”.
query = “INSERT INTO Logging (Nummer, Object_Name, Object_Type, Streng, Start_Time) VALUES (?,?,?,?,current_timestamp)”
Since both are actually strings that come up as for example “Jun 27 2018 2:24PM” I have no idea how I’m going to be able to substract the stop and start time to get the duration amount. If any1 has any ideas I would highly appreciate it.
Here is an example of my table.