Evaluators - unexplainable error

Does anybody know whats wrong with this code below?

value = "2024-01-14";
Output(Now() as "D#w");
Output(value as "D#w");
diff = ( Now() as "D#w" ) - ( value as "D#w" );

Output:

1
2
Error at line 3, position 46
Bad operation (7): )

Does not work either:
diff = Now() as "D#w" - value as "D#w" ;

You’re probably trying to subtract two strings there. Turn them into numbers first.

You are correct, however, it get's even more stranger when trying to cast into an integer:

d1: int = Now() as "D#w";
Output(TypeOf(d1));

value = "2024-01-14";
d2: int = value as "D#w";
Output(TypeOf(d2));

Output:

str
str

Ah, guess what:

d1 = Now() as "D#w" as int;
Output(TypeOf(d1));

Output:

int

So there is a difference between d1: int = and d1 = ... as int.