Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Math.Max and date comparism
Message
De
14/06/2006 09:19:09
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
13/06/2006 20:38:00
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01128876
Message ID:
01128981
Vues:
28
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform