|
-
Jun 20th, 2009, 10:52 PM
#1
Thread Starter
Lively Member
converet date dd/mmm/yyyy to numeric equivalent
i have a data field that comes in as dd/mmm/yyyy
ex: 19/Jun/2009
excel turns that into 19-Jun-2009 or 39983
is there VB code to convert that date format to its nummeric equivalent?
-
Jun 20th, 2009, 11:56 PM
#2
Re: converet date dd/mmm/yyyy to numeric equivalent
Using the 39983, 19 Jun 09 example:
Yes: Format( CDate(39983) , "d/mmm/yyyy") equals 19/Jun/2009
Likewise: Format( CDate(39983) , "d-mmm-yyyy") equals 19-Jun-2009
If your data field is a date field, not text, then: CDbl(Field's.Value) equals 39983
If your data field is a text field, you can try this, but no guarantee VB will interpret it correctly:
CDbl(CDate(Field's.Value))) may equal 39983
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
|