Need a widget like a Date/Time Picker used to enter date and time for Medical Calculations. I cannot find it in the documentation. Second, having trouble creating a Date calculation that finds the difference in two date times in the interval of hours. Example Time the lab is drawn Minus the date/time of birth to determine the age in hours.
Anyone that can give me code snippets for these two issues.
I found the following creative ideas using google:
Hi Timothy,
For this
Second, having trouble creating a Date calculation that finds the
difference in two date times in the interval of hours.
DateDifference[{2021, 3, 1, 12, 0, 0}, Now, "Hours"]
(* Quantity[654.776, "Hours"] *)
Thank you,
I have read the documentation, i still cannot figure out how to create interactive user interfaces, any suggestion to a blog post or article for a newbie.
It would be nice if they had user interface widgets like common Javascript libraries.
Hi. This should help you with the date part of your question.
todateobject[dateinput_] := Interpreter["Date"][dateinput] /. Failure[y__] :> Missing[];
simpledatesetter[Dynamic[x_]] := DynamicModule[{t = x},
DynamicWrapper[ InputField[Dynamic[t], String, ContinuousAction -> False],
x = todateobject[t], TrackedSymbols :> {t}]];
Column[{simpledatesetter[Dynamic[x]], Dynamic@x}]