how to find the delimiter of the system date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chandru8
    New Member
    • Sep 2007
    • 145

    #1

    how to find the delimiter of the system date

    Hi to all
    My user will upload a excel file in to an access 2003 database, the problem is date format for that i used the split function to split the date from the excel.

    The problem is in the split function i specified the delimiter as "/" but some user uses "-" at the time iam getting an error subscript out of range

    If i able to find the system date delimiter ill replace that.,

    thanks in advance.
  • QVeen72
    Recognized Expert Top Contributor
    • Oct 2006
    • 1445

    #2
    Hi,

    Find and Replace "/" with "-"
    and Check or Split for "-"
    Something like this...

    [code=vb]
    Dim MyStr As String
    MyStr = "01/02/2008"
    MyStr = Replace(MyStr,"/","-")
    MsgBox MyStr
    [/code]


    Regards
    Veena

    Comment

    • chandru8
      New Member
      • Sep 2007
      • 145

      #3
      Thanks for your reply
      How ill find the delimiter is "/" or "-" or "."
      that we have to mention in the replace syntax know
      thanks

      Comment

      • QVeen72
        Recognized Expert Top Contributor
        • Oct 2006
        • 1445

        #4
        Hi,

        I mean, By Default Replace all the "/" to "-"
        So if there Date seperator is "/", then the function will replace.
        If Date seperator is "-", Replace Function will have no effect on the data.
        and after Replace Split for "-"
        either case it will work..

        Regards
        Veena

        Comment

        Working...