|
-
February 19th, 2000, 01:39 PM
#1
Date Problem
Hi,
how can I set a specific Date/Time to a Date DataType?
Dim myDate as Date
dim d, m, y, min, h, s as integer
'Month:
d = 25
m = 6
y = 1981
'Time:
min = 59
s = 59
h = 23
'Need some Code to set myDate to the Date #min/d/y h:m:s# (with the Variables, of course)
Sebastian
-
February 19th, 2000, 04:01 PM
#2
Re: Date Problem
Try:
myDate = DateSerial(y, m, d) + TimeSerial(h, Min, s)
'or
myDate = CDate(y & "/" & m & "/" & d & " " & h & ":" & Min & ":" & s)
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Certified AllExperts Expert: http://www.allexperts.com/displayExp...p?Expert=11884
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|