carlpaddick
asked on
How to Convert String Date & Time parameters into DATE type
I have a string value that represents a date in the format "dd/mm/yy", and a time value representing the time in the format "hh:mm". What I need to do is combine and convert them into a DATE value.
I've looked at the VarDateFromStr() function, and it seems to do the job, but I need to know what the date and time string for the first parameter (strIn) will look like.
Any examples would be much appreciated.
I've looked at the VarDateFromStr() function, and it seems to do the job, but I need to know what the date and time string for the first parameter (strIn) will look like.
Any examples would be much appreciated.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
here is link:
http://support.microsoft.com/support/kb/articles/Q241/8/93.ASP
time can be parsed when you specify
VAR_TIMEVALUEONLY
http://support.microsoft.com/support/kb/articles/Q241/8/93.ASP
time can be parsed when you specify
VAR_TIMEVALUEONLY
ASKER
Thanks.
ASKER
migel,
Can you (or anyone else) tell me how you set the time value for the VarDateFromStr function?
It seems that one can use the hyphen character to separate the date value, such as:
27-06-01 or 06-26-01
Does anyone know if the time value's hours and minutes parameters must be separated by a colon(:), such as:
07:30 or 18:45
or another character?
Can you (or anyone else) tell me how you set the time value for the VarDateFromStr function?
It seems that one can use the hyphen character to separate the date value, such as:
27-06-01 or 06-26-01
Does anyone know if the time value's hours and minutes parameters must be separated by a colon(:), such as:
07:30 or 18:45
or another character?
ASKER
Don't worry about the last comment/question - sorted it myself.
Carl
Carl
ASKER
With your helpful MSDN document migel and a bit of experimenting myself, I have sorted out my problem. You were the only person to contribute towards this question, so the points are yours.
Thanks for your help and keep up the good work,
Carl
Thanks for your help and keep up the good work,
Carl
ASKER