I have a date picker with time "slots" (enum).
SLOTS FORMULA:
LIST(
"08:00:00", "08:30:00", "09:00:00", "09:30:00"
"10:00:00", "10:30:00", "11:00:00", "11:30:00",
"12:00:00", "12:30:00", "13:00:00", "13:30:00",
"14:00:00", "14:30:00", "15:00:00")
-
Select(
Reserved[Slots], [Date] = [_THISROW].[Date]
)
-
Select(Reserved[One hour], [Date] = [_THISROW].[Date]) - Select(Reserved[Two hour], [Date] = [_THISROW].[Date]) - Select(Reserved[One&half], [Date] = [_THISROW].[Date]) - Select(Reserved[Two&half], [Date] = [_THISROW].[Date])
They work on the principle: the user selects a date and selects an hour, in enum.
Then I add a condition to this list so that dates + hours do not repeat.
This works by reference type, for making appointments. I also add the start time value to the other sheet.
The problem is that I get absolutely no result (I think because of the misuse of types).
What formula should I use in my case for Start Datetime?
Here are some formulas that might help to better experience:
CONCATENATE([Date], " ", [Slots])
My formula for Start Datetime:
DAtetime(Concatenate(Date([DateID].[Date]), " ", Time([DateID].[Slots])))
Short anwer:
Change the Date + Time VC to:
[Date]+TIME([Slot])
And the column type of that VC to DateTime.
Start Datetime can be:
[DateID].[YourVC]
@SkrOYC Yes, I tried it, initially my "slots" fields are of type time(), and VS is "datetime"
I solved this problem and I sincerely don't understand why it doesn't work.
I created a virtual string IDENTICAL to startDateTime...
And when I create a new entry, the virtual string applies the value, but the one I need does not...
But I fixed this problem by adding a bot that, when adding a new line, changes the values โโof the field I need to the virtual line field.
And after reloading:
If your Slots column is alread basetype Time, you don't need to wrap [Slot] with Time().
Also, I've found that the expression assistant says there is a problem sometime when there isn't. It gets fixed after save.
Finally, I made a mistake with the expression, do this instead:
[Date]+[Slot]+"000:00:00"
Remove TIME()
Doesn't matter, anyway still an error, But this is not a problem, thank you very much for trying to help, but I solved this problem with "workarounds"
DATETIME([Date]) + ([Slot] - "00:00:00")
[Date] is already Date type
[Slot] is Time type
"000:00:00" a Duration
Date + Duration is already DateTime, right? ๐ค
Maybe? Off the top of my head, I don't know, so I chose to suggest something I was sure of. ๐
User | Count |
---|---|
43 | |
26 | |
23 | |
14 | |
13 |