Compose Date Function

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi:
I am looking for composing the Date as function of Year, Month, Day, Hr,
Min. Each argument as an Integer. So, lookin for MyDate = CustFunct(Year,
Month, Day, Hr, Min).
Thanks in advance.
 
Hi:
I am looking for composing the Date as function of Year, Month, Day, Hr,
Min. Each argument as an Integer. So, lookin for MyDate = CustFunct(Year,
Month, Day, Hr, Min).
Thanks in advance.

Look up the DateSerial and TimeSerial functions in VBA help.
 
You will need to use the DateSerial and TimeSerial functions added together
to get both in the same variable:
dateserial(1943,5,25) + timeserial(18,33,30)
will return:
5/25/1943 6:33:30 PM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top