2012-01-22 00:00:00.000
We can use convert function to truncate minute and second timestamp using the convert function
convert(varchar(8), Valuation_Date, 112)
then we will get following reault:
20120122
convert(varchar(8), Valuation_Date, 112)
array1=[1,6,2,3,7];
array2=[3,6];
arrayfun(@(x)find(array1==x,1),array2)
The output is: # Quit R
q()
q(save="no")
# Setting the default working directory
setwd(file="c:\\AnyDirectory\\")
setwd(file="c:/AnyDirectory/")
# Get the default working directory
getwd()
# See which variables are currently in the workspace
ls()
# Remove a list of variables
rm(var1,var2,var3,...)
# Remove all objects from workspace
rm(list=ls())
# Note: the variables whose names begin with a dot are not listed by ls(), so they are not removed by above command.
# Instead, you can use following command to remove them
rm(list=ls(all=TRUE))
# Load a package
library(PackageName)
# Sink R output to a file
sink(FileName)
sink(NULL) # stop the sink
> cat("I said:\"Hello!\"",'then smile.')
I said:"Hello!" then smile.
> cat("This is Eric\'s book,",'and that is Mike\'s toy.')
This is Eric's book, and that is Mike's toy.
Dim TopRow As Long
Dim BottomRow As Long
With ActiveSheet.ChartObjects(1)
TopRow = .TopLeftCell.Row
BottomRow = .BottomRightCell.Row
End WithWorksheets("Sheet1").Range("A5").Top
Worksheets("Sheet1").Range("B7").Left
Worksheets("Sheet1").Columns(6).Left
Worksheets("Sheet1").Rows(11).TopObjExcel = actxserver('Excel.Application');
TheWorkbook = ObjExcel.Workbooks.Open('example.xls');
DataSheet = TheWorkbook.Sheets.Item('Data');
RowLastChartBottom = 0;
for i = 1 : 10
RowChartTitle = RowLastChartBottom + 2;
DataSheet.Range('A', num2str(RowChartTitle)).Value = ['Chart ', num2str(i)];
%---
RowChartTop = RowChartTitle + 1;
PointsChartTop = ChartSheet.Range(['B', num2str(RowChartTop)]).Top;
ChartObject = ChartSheet.ChartObjects.Add(10, PointsChartTop, 1000, 250);
ChartObject.Chart.HasTitle = 1;
ChartObject.Chart.ChartTitle.Text = '......';
ChartObject.Chart.Axes.Item(1).TickLabelPosition = 'xlTickLabelPositionLow';
%---
CurveObject = ChartObject.Chart.SeriesCollection.NewSeries;
XRange = DataSheet.Range(......);
YRange = DataSheet.Range(......);
CurveObject.XValues = XRange;
CurveObject.Values = YRange;
CurveObject.ChartType = 'xlLineMarkers';
CurveObject.MarkerSize = 2;
CurveObject.Format.Line.Weight = 2;
%---
RowLastChartBottom = ChartObject.BottomRightCell.Row;
end
\documentclass[8pt,onecolumn,letterpaper]{article}
\usepackage[top=0.5in, bottom=0.5in, left=1.0in, right=1.0in]{geometry}
\setlength{\columnseprule}{0.25pt}
\usepackage[utf8x]{inputenc}
\usepackage{ucs}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{bm}
\setlength{\parindent}{0in}
\setlength\parskip{0.1in}
\linespread{1.25}
\usepackage{graphicx}
\usepackage{color}
\usepackage[colorlinks=true, pdfstartview=FitV, linkcolor=blue, citecolor=blue, urlcolor=blue]{hyperref}
%\usepackage{fancyhdr}
%\pagestyle{fancy}
%\renewcommand{\headrulewidth}{0.0pt}
%\fancyhead{}
%\fancyfoot[CF]{\thesection - \thepage}
\author{Quant Lego}
\title{This is an article template}
\begin{document}
\maketitle
\tableofcontents
\pagenumbering{roman}
\newpage
\pagenumbering{arabic}
\section{Introduction}
\section{Methods}
\section{Results}
\section{Discussions}
\section{Conclusions}
\end{document}