[Blotter-commits] r1079 - pkg/blotter/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 28 10:47:13 CEST 2012


Author: opentrades
Date: 2012-06-28 10:47:13 +0200 (Thu, 28 Jun 2012)
New Revision: 1079

Modified:
   pkg/blotter/R/addTxn.R
Log:
* applied format to transaction date printout to ensure printing of 00:00:00 for midnight



Modified: pkg/blotter/R/addTxn.R
===================================================================
--- pkg/blotter/R/addTxn.R	2012-06-28 04:38:16 UTC (rev 1078)
+++ pkg/blotter/R/addTxn.R	2012-06-28 08:47:13 UTC (rev 1079)
@@ -110,7 +110,8 @@
     Portfolio$symbols[[Symbol]]$txn<-rbind(Portfolio$symbols[[Symbol]]$txn, NewTxn)
 
     if(verbose)
-        print(paste(TxnDate, Symbol, TxnQty, "@",TxnPrice, sep=" "))
+#        print(paste(TxnDate, Symbol, TxnQty, "@",TxnPrice, sep=" "))
+        print(paste(format(TxnDate, "::%Y-%m-%d %H:%M:%S"), Symbol, TxnQty, "@",TxnPrice, sep=" "))
         #print(Portfolio$symbols[[Symbol]]$txn)
     
     assign(paste("portfolio",pname,sep='.'),Portfolio,envir=.blotter)



More information about the Blotter-commits mailing list