Question regarding date/time variable:

Any feedback or questions about spssforum.com

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

pokahontas
Posts: 3
Joined: Tue Sep 30, 2014 7:57 pm

Question regarding date/time variable:

Postby pokahontas » Tue Sep 30, 2014 8:09 pm

Hi! I need to create a date/time variable in "dd-mmm-yyyy hh:mm:ss" format from 2 different variables, containing date (dd-mmm-yyyy format) and time (hh:mm:ss format). Could you help me figure out how to do this? Is there a way to merge the 2 variables?
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Question regarding date/time variable:

Postby GerineL » Wed Oct 01, 2014 7:39 am

yes, look into the date-time wizard.
pokahontas
Posts: 3
Joined: Tue Sep 30, 2014 7:57 pm

Re: Question regarding date/time variable:

Postby pokahontas » Wed Oct 01, 2014 10:00 am

Hi- Thanks for your reply. I've been looking into the date/time wizard, but it doesn't seem to have any instruction of how to COMBINE 2 variables with date and time into a single date/time variable. I saw you can extract parts of a date variable, but that's not what I want to do.
Thanks for your help!
GerineL
Moderator
Posts: 1477
Joined: Tue Jun 10, 2008 4:50 pm

Re: Question regarding date/time variable:

Postby GerineL » Wed Oct 01, 2014 11:57 am

the name of the function you need is something like " create date time variable from variables holding parts of date time variables" .
pokahontas
Posts: 3
Joined: Tue Sep 30, 2014 7:57 pm

Re: Question regarding date/time variable:

Postby pokahontas » Wed Oct 01, 2014 2:03 pm

Hi! Thanks again for the speedy response! I've now created separate variables for year, month, date, hour, min, sec and I'm trying to "create date time variable from variables holding parts of date time variables" but the output variables types does not include "dd-mmm-yyyy hh:mm:ss". The available output types are yy/mm/dd etc.
Thanks for your help!

Who is online

Users browsing this forum: No registered users and 1 guest

cron