![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: May 2002
Location: mtl, canada
Posts: 160
|
Thank you for your reply. I tried your suggestion and it didn`t seem to work, perhaps if i gave u the command.
assuming i've entered the date in cell B1 then to make my call i have to say mydate.Date>={ts '2002-05-09 00:00:00'} now i need to know a) what to enter in B1 (format of date) b) what command to use in VBA? thanks again |
|
|
|
|
|
#2 |
|
New Member
Join Date: May 2002
Posts: 7
|
Try this cell format:
yyyy-mm-dd hh:mm AM/PM |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Location: Greenwood, SC
Posts: 677
|
How about this...
Dim datEnter As Date Dim strOut As String datEnter = Range("B1").Value strOut = "{ts '" & Year(datEnter) & "-" & Month(datEnter) & "-" & Day(datEnter) & " 00:00:00" & "'}" mydate.Date >= strOut If you really need the leading zeros for the day and month, you will need to do some conditional checking. I.e. If Month(datEnter) < 10 then use "0" & month(datEnter) and the same for the day. K |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|