Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting date into sql or firebird;What is .t. value in
Message
 
To
17/09/2005 08:07:43
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01050571
Message ID:
01057113
Views:
9
Hi Kerwan

Try it this way, shouldn't be hard to miss.
?sqlexec(nHandle,'INSERT INTO X (date) values (' + FBDTOS({01/01/2005}) + ')')
?sqlexec(nHandle,'INSERT INTO X (date) values (' + FBDTOS(DATE()) + ')')

FUNCTION FBDTOS(tdDate)
	RETURN "'" + TRANSFORM(YEAR(tdDate), "@L 9999") + "-" ;
		+ TRANSFORM(MONTH(tdDate), "@L 99") + "-" ;
		+ TRANSFORM(DAY(tdDate), "@L 99") + "'"
ENDFUNC
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://venussoftop.tripod.com
___________________________________________
venussoftop@gmail.com
___________________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform