String being outputted as a Date

chris-uk-lad

Registered User.
Local time
Yesterday, 19:28
Joined
Jul 8, 2008
Messages
271
Hi all,

Within my code i receive a string of a date e.g 20060701, which i manipulate to read 01/07/2006. The variables are Strings, the column of the Table the date is being inserted into are text, and the export spec im running displays it as text.

The output shows the date + the time (00:00:00) and i have no idea why its being interpretted as a date. Any thoughts / suggestions? If i run it without an export spec it outputs correctly but i need a spec for other reasons.

Thanks
 
Any date is a Date/Time ... thus will include the time...

What you are doing is probably a combination of right/left/mid and then DateSerial (or something) right??

The problem is your letting Access do an implicit conversion, this allows room for access to think... instead of you telling it what to do...

Instead if you want to set this date into a string field, EXplicitly convert the date to a string using the FORMAT function. This should resolve your problem.
 

Users who are viewing this thread

Back
Top Bottom