Last Modified Date: 10 May 2017
AnswerThe attached example workbook uses the sample data set Superstore to demonstrate the following directions:
- Select Analysis > Create Calculated Field
- Name the calculated field. In this example, the calculated field is named "String Date". Create a calculation similar to the following, then click OK:
STR( [Date] )
- Drag [String Date] to the Rows shelf. Count the position of the millisecond number as a number of characters including spaces and punctuation.
In this example, the date was imported in the format yyyy-dd-MM hh:nn:ss.SSSS. The millisecond number is the 23rd character in this string.
- Create a calculated field with a name like "Millisecond Datepart" with a calculation similar to the following:
INT( MID( STR( [Date] ), 23, 1 ) )
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials