1. About.com
  2. Computing & Technology
  3. Delphi

Discuss in my forum

Correct date format for SQL

By , About.com Guide

Date values in SQL is always saved in "MM/DD/YY(YY)" format.

Here's a line of code to get the string in the correct format for SQL:

FormatDateTime('mm"/"dd"/"yyyy', Now)

Delphi tips navigator:
» Delphi application that copies itself
« Kylix - Execute an application

©2012 About.com. All rights reserved. 

A part of The New York Times Company.