Extracting portions of text from string

Popolou

Registered User.
Local time
Today, 02:45
Joined
Feb 3, 2005
Messages
15
Hello all,

Ultimatey, my problem is linked to another issue i have posted, but since its a totaly new request.....

How can you extract a portion of text from a string? I intend to convert a date entry/field into a string and then extract the day and month, leaving behind the year.

So: -

-----------------------
Dim DateStr
DateStr = Format(Date, "Long Date")
[Forms]![Data Entry Form]![Test] = DateStr
-----------------------

If it returns 10 February 2005, i would like to extract the "10 February" from the full date.

Subsequently, i would want to add to this another string entry then the aggregate entry will be CDate'd to a long date.

Is this possible, and how will it be done?

Thanks,

Regards

Popolou
 
To extract the day and month use

Code:
Format([YourDate],"dd mmmm")

Col
 
Of Course! Thanks!

Now, how does one combine one string with another? So, for example i have now got "10 February" with "2005" - two different strings?

Update: I think i got it. I used CDate(strEndMonth & " " & strEndYear) to combine both strings with the gap in-between.

Thanks!

Popolou
 
Last edited:

Users who are viewing this thread

Back
Top Bottom