[DUG] MSDE Date Conversion

Neven MacEwan neven at mwk.co.nz
Fri Aug 4 13:40:33 NZST 2006


Dave

AFAIK MSSQL doesn't have a literal 'date' format, I always use the ansi 
'2006-08-04' string which converts ok


Dave O'Brien wrote:
> I am using MSDE for the first time and am having problems with dates. I
> have had this problem with dates on all the DB's I have used. I can just
> never work out the format...
> 
> 'Insert into Table (aDate) values (''#'+FormatDateTime('yyyy-mm-dd
> hh:nn:ss', Now)+'#'')' ;
> 
> What format string should I use for this to work?
> Using DBGo TADOQuery...
> 
> Cheers,
> David O'Brien.
> 
> 
> _______________________________________________
> Delphi mailing list
> Delphi at ns3.123.co.nz
> http://ns3.123.co.nz/mailman/listinfo/delphi
> 
> 

-- 
Neven MacEwan (B.E. E&E)
Ph. 09 620 1356 Mob. 027 4749 062

New Address Details
===================
MWK Computer Systems
1 Taumata Rd
Sandringham
Auckland

Ph 620 1356
Fx 620 1336
-------------- next part --------------
A non-text attachment was scrubbed...
Name: neven.vcf
Type: text/x-vcard
Size: 164 bytes
Desc: not available
Url : http://ns3.123.co.nz/pipermail/delphi/attachments/20060804/4bd85a25/neven.vcf


More information about the Delphi mailing list