Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Math.Max and date comparism
Message
From
14/06/2006 09:19:09
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
13/06/2006 20:38:00
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01128876
Message ID:
01128981
Views:
23
This message has been marked as the solution to the initial question of the thread.
>Is there a way to use Math.Max to get the maximum date between two dates? I tried to do that and it generates a design time error.

Michel,
Math.Max doesn't support DateTime as operands but an integral value like long and DateTime.Ticks is a long value. ie:

myMaxDate = DateTime.MinValue.AddTicks( Math.Max( dt1.Ticks, dt2.Ticks ) )

Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform