|
-
Nov 9th, 2000, 06:21 PM
#1
Thread Starter
Fanatic Member
I have the following variable that is replacing the "/" with "_" and is taking the first 9 characters to the left. I then place that variable in a text box. txtdate.text is grabbing the date created attribute from a file and putting it into its text property. This works great, the problem occours when the date is say 1/2/2000. On some computers this shows as 1/2/00 leaving three spaces after that. At this point it then grabs the three next characters which are a space, and the first two digits of the time it was created. Example 1/2/00 12. What I want to do is have the date only be thrown into the fdate variable. In other words 11/09/2000. Do anyone see a way to do this? I have tried to format it as a date but it then formats is as the current date????
Dim fdate As String
'this names the file according tot he date, client ID and type of doc
fdate = Left(Replace(txtDate.Text, "/", "_"), 9)
-
Nov 9th, 2000, 06:30 PM
#2
_______
<?>
MsgBox Format("1/2/00", "ddmmyyyy")
'or
MsgBox Format("1/2/00", "dd/mm/yyyy")
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 9th, 2000, 06:33 PM
#3
_______
<?>
or in the event of variables
Code:
Private Sub Command1_Click()
x = "1/2/00"
y = "11/22/2000"
x = Format(x, "dd/mm/yyyy")
'or
y = Format(y, "dd/mm/yyyy")
MsgBox x & vbCrLf & y
End Sub
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 9th, 2000, 07:03 PM
#4
Thread Starter
Fanatic Member
When you put in the 1/2/00 or 2000 doesn't that specify that specific date or does it refer to all dates?
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
|