MapBasic - Convert Excel date to MapInfo date

226 views Asked by At

If I have a table of Excel dates:

Date
-------
44197
44202
44272
44270
44241
44201
44206

How do I convert this into the MapInfo date format?

Date
20210101
20210106
20210317
20210315
20210214
20210105
20210110

Using MapBasic.

1

There are 1 answers

0
Sancarn On

This does the trick:

Update tableName set Date = StringToDate("01/01/1900")+(Date-2)