IBM Support

Date format not available, IBM SPSS Statistics 21 or 22

Troubleshooting


Problem

I have over 2 million cases and have to calculate the differences in date values. My dates came into SPSS as strings. The current format is: yyyy.mm.dd hh:mm:ss You do not have this date/time format specified in your pre-defined date formats. How can I convert this format to enable calculation of the difference between dates? I have over 5 columns with dates in this same format and need to calculate the time difference between dates in these columns.

Cause

This is functioning as designed.

Resolving The Problem

This format (yyyy.mm.dd hh:mm:ss) is not yet available with the current release of SPSS Statistics.


Please re-format yyyy.mm.dd hh:mm:ss to a format that IBM SPSS Statistics can recognise in a 3rd party application, such as MS Excel.

This can be done by the following steps:

* Copy the date variable from SPSS Statistics to Excel;

* Then edit it by ‘Find & Select’->’Replace’ function;

* Find ‘.’ And replace with ‘/’. Select ‘Format’;

* In ‘Replace Format’ window, chose ‘Custom’, input dd-mmm-yyyy hh:mm:ss into ‘Type’ box;

* Click ‘OK’ button. And ‘Replace All’ button in ‘Find and Replace’ window;

Your date variable would be changed to an acceptable format for SPSS Statistics.
Then, please copy the new values and past it into your SPSS Statistics dataset.

[{"Product":{"code":"SSLVMB","label":"IBM SPSS Statistics"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF014","label":"iOS"},{"code":"PF033","label":"Windows"}],"Version":"21.0;22.0","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 April 2020

UID

swg21681685