[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
RE: [OT] SQL Query
Erm, yep
You can use the CVDate function
CVDate(Left(Field,2) & "/" & mid$(Field,3,2) &
"/" & mid$(Field,5,2))
I think my mid$ are wrong there, but the help file will sort you out.
Mid$ is like lefts, it allows you to take a bit out of a string. What I
have done here, is take the dd,mm and year bits out of the string and
recreated a pseudo date using /, and then used the cvdate function to
return a variant of type datetime.
-----Original Message-----
From: Stuart [mailto:lists@xxxxxxx]
Sent: 06 August 2004 08:39
To: ukha_d@xxxxxxx
Subject: RE: [ukha_d] [OT] SQL Query
Thanks for that Steve.
Now is there a way that I can take said 8 digit date, and format it to
look like a real date ie 04 08 2004??
/me ducks ;-)
-----Original Message-----
From: Steve Abbott [mailto:steve.abbott@xxxxxxx]
Sent: 06 August 2004 08:40
To: ukha_d@xxxxxxx
Subject: RE: [ukha_d] [OT] SQL Query
Msgbox(Left(youfieldname,8))
Or
dim x as string
Dim y as string
Y = "20040804125000"
X = left(y,8)
There you go.
Steve
-----Original Message-----
From: Stuart [mailto:lists@xxxxxxx]
Sent: 06 August 2004 07:48
To: ukha_d@xxxxxxx
Subject: [ukha_d] [OT] SQL Query
Hello SQL Gurus ;-)
I have a field in an access database that is (like) 20040804125000.
Clearly this is year/month/day/hour/minute/second.
What can I put to only get the first 8 characters (ie date only)
Thx in advance
Stuart
[Non-text portions of this message have been removed]
UKHA_D Main Index |
UKHA_D Thread Index |
UKHA_D Home |
Archives Home
|