Learned lots, but I think that I may be solving a problem that isn't there.
Left$("Janvier", int(Month(CurDate())=1)*7)+Left$("F�vrier",
int(Month(CurDate())=2)*7)+" "+Day(CurDate())+", "+Year(CurDate())
Georges DAGUERRE
The above example works well and adds only one table and a couple of lines
to the workspace. However with the max character limit of the label dialog
box, it is only good through June. I tried to edit the workspace in a text
editor but it would revert when it was saved in MapInfo.
Isn't it that the actual printed date format defined in the Windows
"Regional settings"?
SET FORMAT DATE "LOCAL"
"Users can configure various date ... formatting options by using control
panels that are provided with the operating system"
Jacques Paris
Jacques is correct that Regional settings can be modified, but it
stipulates a short date and a long date and it appears that CurDate pulls
from short date. I also learned that MapInfo's native date format is
yyyymmdd with no spaces or other characters.
first create a table, Months.TAB with 2 columns, like this
Create Table "Months" (Month_Integer Integer,Month_Name Char(10))
Populate this table with 1 January, 2 February, etc
Run this query
Select Month_Name+" "+Day(CurDate())+", "+Year(CurDate()) from Months where
Month_Integer = (Month(CurDate())) into Todays_Long_Date
This pulls the long month name from the table based on today's month
(Month(CurDate()) in the WHERE clause, concatenate a space with " ", Day
CurDate gives you the day of the month, concatenate a comma and space, then
the year.
If you are using the SQL wizard:
Column Section, replace the * with- Month_Name+" "+Day(CurDate())+",
"+Year(CurDate())
Table Section- Months.TAB
Where section - Month_Integer = (Month(CurDate()))
Into section - Todays_Long_Date
The same expression maybe used as a label. Add Months (check editable) and
Todays_Long_Date (check label) query into layer control and place a point
object with N symbol (invisible), the long date appears, place that same
point in a separate map window and place a frame in layout (use N for frame
border), and the long date is in your layout window.
William "Woody" Woodruff
Woody's way works. Similar to Georges, but with a lookup table of months
and names.
Thank you to the respondents.
____________
Kent Treichel
Analyst-GIS
Tax Research
Minnesota Department of Revenue
MS 2230
600 North Robert St
St. Paul, MN 55146-2230
651-556-6150
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 9808