I have to match 2 data sets by id and date/time. One data set has a single datetime var, the second data set has 6 variables: year, month, day, hour, minute, second.
My suggestion is for a single function to make a datetime var from the 6 components.
NewDateTimeVar = MDYHMS( month, day, year, hour, minute, second);
I know I can use NewVar = DHMS(MDY(month, day, year), hour, minute, second); but my suggestion would be cleaner.
Some possible variants:
YMDHMS would allow you to list the parameters in descending order. (year, month, day, hour, minute, second)
DMYHMS would allow for the typical European format for dates (DayMonthYear) order. (day, month, year, hour, minute, second)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.