Forum Discussion

Nathan_H_'s avatar
Nathan_H_
Ideator I
3 years ago
Solved

C# SQL Date Query

Good day all, I am trying to create a dynamic report to produce the time it take between starting an activity and ending an activity.  I can get the information I am looking for by using SQL, but i...
  • AngelaIp's avatar
    AngelaIp
    3 years ago

    Edit: We are all blind! 

    Take a look at my picture again. Do you notice something? I have added your BETWEEN date filter. Does the filter work? Yes...but NO! It´s uses the filter but with the date in a in wrong format, which can lead to all kind of wrong results. [I cannot remember ever having similar problems before whenever using dates....]

    Solution in my case: WHERE  (Act_Assign.MODIFIED_ON BETWEEN '20230801' AND '20230802')

    As alternative, something with convert(datetime,...) should also do the job.