Compare two dates from table Dynamics

Sv1N2SSv1N2S Member Posts: 13
I'm having problem with my little task. I have a table with information about two users who are working during this time. If this time intersect I need get a MESSAGE/ERROR about it. Can you explain how to do this? Thanks!!rm4jfyg8snek.jpg

Best Answer

Answers

  • JuhlJuhl Member Posts: 724
    Use 2 Date records (virtual table).
    Do a setrange on both with data from each user, if the both return NOT ISEMPTY you have your error.
    Follow me on my blog juhl.blog
  • AKAK Member Posts: 226
    edited 2017-10-20
    I don't know if I get the task, but if Name, Date Start and Date Finish are the primary key of that table, the error will occur automatically when the same user will have the same start and end date twice.
  • pleachim@outlook.compleachim@outlook.com Member Posts: 24
    just imagine you can not post a date twice AND you can not have a starting date between another timespan. Then you have to do a check like mine above
  • Sv1N2SSv1N2S Member Posts: 13
    thanks for helping
Sign In or Register to comment.