+ Reply to Thread
Results 1 to 2 of 2

concatenate dates into one string

  1. #1
    Registered User
    Join Date
    01-28-2012
    MS-Off Ver
    Excel 2007
    Posts
    19

    concatenate dates into one string

    Hii guys,

    Need some help writing a VBA script for an access form. Please do help me out.
    Here s what I have:

    A access form that gives the start date(StrDate) and enddate(EndDate) for reporting.
    I need to query the data base for records between these two dates but here is the catch.

    The coulumn Month ( which I would like to query between StrDate and EndDate) is not in the date format.
    It is in Text and has values such as "Q1 2006" or "2006-01-Jan" where 01 represents the month and not date.
    So the month of February would be represented as "2006-02-Feb".
    If the date was in the form Q1 then I know that I need to resolve the start date to "2006-01-Jan"

    So This is what I would like to do :

    write a function that takes the two dates, and concatenate all month in between as one string.
    For example if the two dates are Q1 2006 and Q2 2006. The dates in between would be
    "2006-01-Jan" , "2006-02-Feb", "2006-03-Mar" , "2006-4-Apr", "2006-5-May" and "2006-6-Jun"


    How do i do this ?
    Thank you guys for reading through this complex description.

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,834

    Re: concatenate dates into one string

    Example
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA to concatenate a string, to a cell value in a range, to another string.
    By Sacharny in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2013, 03:42 PM
  2. Concatenate string and function
    By nousername in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-11-2008, 06:07 PM
  3. Concatenate string variables in VB
    By Willow in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-13-2006, 09:59 AM
  4. Concatenate in a string
    By IntricateFool in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-07-2006, 02:35 PM
  5. [SOLVED] string concatenate
    By DorisM in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-06-2005, 09:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1