Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » [sqlite] SqlCurrentTime is inconsistent with TIME definition
[sqlite] SqlCurrentTime is inconsistent with TIME definition [message #47439] Mon, 16 January 2017 22:25
Zbych is currently offline  Zbych
Messages: 327
Registered: July 2009
Senior Member
Hi,

TIME in sqlite is defined as "datetime", but SqlCurrentTime is just "time('now')", not "datetime('now')", so when I insert/update TIME field I got only hour without date.


Sqlite3Schema.h:
#define TIME(x)                    COLUMN("datetime", Time, x, 0, 0)

SqlVal.cpp:
SqlVal SqlCurrentTime() {
	return SqlVal(SqlCode(SQLITE3, "time('now')")
	                     ("current_timestamp"), SqlVal::HIGH);
}

[Updated on: Mon, 16 January 2017 22:28]

Report message to a moderator

Previous Topic: grid control hidden field sql accept
Next Topic: I propose to Add Postgresql to topic header
Goto Forum:
  


Current Time: Fri Jun 21 21:46:17 CEST 2024

Total time taken to generate the page: 0.01562 seconds