Date Conversion

Blitz3D Forums/Blitz3D Beginners Area/Date Conversion

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I need to be able to convert a date in this format:

"04/10/05" (YY/MM/DD)

to this format:

"Fri 02-13-2004" (Day MM/DD/YYYY)

I can do the string manipulation easily enough, but does anyone know of a simple way of working out what DAY something occured on based solely on the date? I could use a lookup table, I'm sure, but an algorithm taking account of leap years (and millenia!) would be nice!

Thanks,

Paul