Antoine: You asked

>I have some random date (ex : 01/23/98), and i need to know the day of the
>week associate with this date(ex:sunday)....
 
You could use the standard MapBasic function called Weekday(date) that returns the day-of-week number
for any date.  Number 1 means "Sunday", 2  means "Monday" and so on.
 
Try it in MapInfo by:
a.  selecting Options>Show Mapbasic window...
b.  typing the following string and pressing Enter
 
   note WeekDay("01/23/98")
 
To convert the number to a name try:
 
   dim i as smallint
   i = WeekDay("01/23/98")
   note Mid$("SUNMONTUEWEDTHUFRISAT",(i-1)*3+1,3)
 
Regards
 
David M Haycraft                   Phone/Fax:  61 + 2 + 6231 8104
Information Analysis Assocs  P/L   Mobile:     0412 001 134
ACN 085 516 105                    Email:      [EMAIL PROTECTED]
1 Cumming Place, Wanniassa         Web:      www.acslink.aone.net.au/actaa/iaa.htm
A.C.T. 2903, Australia             A MapInfo Partner
 
 
 
  • MI vb Gilbert, Antoine
    • MI VB Gilbert, Antoine
    • David M Haycraft

Reply via email to