Think of something that you wish Authorware could do but it doesn't?  Let the our good friends at Macromedia know via the wishlist.

Please let us know if you find any of the materials on this site inappropriate or offensive. Please include the url and why the material should be reviewed.

Comments and questions about the site are also welcome. Please no Authorware questions, use the AWARE list.


1030 - How can I reformat the date from 2000-12-18 to 12/18/00?

by - Joseph Ganci

I have about 40 small 5 question quizzes in my one app.5.1 I am using the quiz KO for each one. I am getting all the responses in and out by tracking the SS#, but my data which is being retrieved with the variable that is from the KO, 'DB_ODBCData' returns the 'TestDate' as something like '2000-12-18 00:00:00.' The date I send in is the Date function. It seems to be adding in hours, minutes, and seconds. I would like to get rid of the 0's and be able to re-format the date to xx/xx/xx. Itís an MS Access driver, but formatting the Access database fields doesn't seem to work. My windows date clock is set right. Any suggestions?

If you're just looking to grab the data and reformat it from the database string, then here's a quick example:

TestDate := "2000-12-18 00:00:00" -- of course, you normally wouldn't use this line.
NewDate := SubStr(TestDate, 6, 7) ^ "/" ^ SubStr(TestDate, 9, 10) ^ "/" ^SubStr(TestDate, 3,4)

Then "2000-12-18 00:00:00" becomes "12/18/00".

There are 0 reviews
Add your review