Results 1 to 2 of 2

Thread: Date Format

  1. #1

    Thread Starter
    Fanatic Member pradeepkrao's Avatar
    Join Date
    Sep 2001
    Location
    New Jersey
    Posts
    534

    Date Format

    Hi,

    My system dateformat is mm/dd/yyyy.

    VB Code:
    1. Dim strSql as String
    2.  
    3. strSql = txtDate.Text ' mm/dd/yyyy format 03/04/2003
    4.  
    5. strSql = "select * from items where item_dt = #" & Format(strSql,"mm/dd/yyyy") &"#"
    6.  
    7. MsgBox strSql
    8.  
    9. ' The above shows
    10. ' select * from items where item_dt = #04/03/2003#

    Can anybody please suggest me what format to use and how to go about such problems..

    Thanks,
    Pradeep
    Learn by others experience as you cannot live long to experience them all.
    www.freewebs.com/pradeepkrao

    LOOK AT MY GAMES AT MY WEB SITE.

  2. #2
    Frenzied Member PilgrimPete's Avatar
    Join Date
    Feb 2002
    Posts
    1,313
    You could try this:
    VB Code:
    1. strSql = "select * from items where item_dt = #" & Format(strSql,"dd mmmm yyyy") &"#"

Posting Permissions

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



Click Here to Expand Forum to Full Width