what datetime functions does =now() support, i was trying to set a parameter default value to =now().AddDays(-1).Date but now() does not seem to return a true datetime. Is there a way to do this
thanks
kevin
1 Answer, 1 is accepted
0
Steve
Telerik team
answered on 04 Sep 2008, 10:54 AM
Hi Kevin,
There are two possible approaches to handle such scenario:
Make an explicit convertion to double - =Now().AddDays(CDbl(-1)).Date
Create a user function that returns the desired DateTime:
public static DateTime MyTime()
{
return DateTime.Now.AddDays(-1).Date;
}
and then invoke it directly with =MyTime().
Hope these help.
All the best,
Steve
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.