U++ framework
Do not panic. Ask here before giving up.

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: 332
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

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


Current Time: Sat Apr 25 18:59:08 GMT+2 2026

Total time taken to generate the page: 0.00530 seconds