Home » U++ Library support » U++ SQL » Sql Lite schema with DATE type  
	
		
		
			| Re: Sql Lite schema with DATE type [message #51739 is a reply to message #51736] | 
			Fri, 10 May 2019 15:05   | 
		 
		
			
				
				
				
					
						  
						NattyRoots
						 Messages: 2 Registered: April 2019 
						
					 | 
					Junior Member  | 
					 | 
		 
		 
	 | 
 
	
		Hello BioBytes,  
 
Thank you for your answer ! But unfortunately it did not seems to be my problem. 
 
I came up with a solution by storing a timestamp generated in C++ in my column DATE_SESSION, rather than using the SQLDEFAULT() : 
 
.sch : 
TABLE_ (SESSION)
	INT_ 	(SESSION_ID) PRIMARY_KEY AUTO_INCREMENT
	STRING_ (BATTLETAG, 200)
	STRING_ (DISCORD_NAME, 200)
	STRING_ (RANK, 4)
	INT_ (DATE_SESSION)
END_TABLE
  
 
Code :  
std::chrono::milliseconds ms = std::chrono::duration_cast< std::chrono::milliseconds >(
     std::chrono::system_clock::now().time_since_epoch()
);
Sql sqlInsert;
sqlInsert*Insert(SESSION)(BATTLETAG, battletag)(DISCORD_NAME, userName)(RANK, rang)(DATE_SESSION, ms.count());
 
 
Thanks for the help anymway, 
 
Natty
		
		
		[Updated on: Fri, 10 May 2019 15:05] Report message to a moderator  
 |  
	| 
		
	 | 
 
 
 |  
  
 
Goto Forum:
 
 Current Time: Tue Nov 04 14:35:45 CET 2025 
 Total time taken to generate the page: 0.12359 seconds 
 |