On Aug 29, 2016, at 2:00 PM, Timothy Penner wrote:

> Here are two more ways to insert timestamps into 4 via SQLD:
> 
> Massaging the data:
> 
> $timeStamp_t:=String(Current date;ISO date GMT;Current time)  
> $timeStamp_t:=Replace string($timeStamp_t;"T";" ")  // remove T from middle 
> of timestamp
> $timeStamp_t:=Replace string($timeStamp_t;"Z";"")  // remove Z from end of 
> timestamp
> Begin SQL
> INSERT INTO Table_1 (Field_2) 
> VALUES (:$timeStamp_t);
> End SQL

Thanks Tim. This is what I was looking for. 

The 4D SQL engine is so strict. I wish it would recognize the timestamp format 
that 4D itself provides via the “String” command. But wishing does no good, and 
feature requests do only slightly more good. 

At least now I know how to massage a 4D timestamp into a format the 4D SQL 
engine accepts. 

Tim

********************************************
Tim Nevels
Innovative Solutions
785-749-3444
[email protected]
********************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[email protected]
**********************************************************************

Reply via email to