www.webdeveloper.com
Results 1 to 8 of 8

Thread: time

  1. #1
    Join Date
    Dec 2002
    Posts
    16

    time

    Hi,

    Code:
    FormatDateTime(now(),vblongtime)
    When I store that above into the database it actually gives me this : 1/1/1900 10:47:42 AM
    I do not want the '1/1/1900' part
    How can I remove it easily?

  2. #2
    Join Date
    Dec 2002
    Posts
    54

    Re: time

    Originally posted by jux82
    Hi,

    Code:
    FormatDateTime(now(),vblongtime)
    When I store that above into the database it actually gives me this : 1/1/1900 10:47:42 AM
    I do not want the '1/1/1900' part
    How can I remove it easily?
    Please let me know the exact requirement. Do you want to have todays date in mm/dd/yyyy hh:mm:ss format? It will be helpful if you will tell me the exact requirement.

    Vishal

  3. #3
    Join Date
    Dec 2002
    Posts
    16
    vishu_gupt,

    Sorry if you didn't get what I want
    I have already told you that I only want the time portion as in : 10:47:42 AM
    What I have currently is :
    1/1/1900 10:47:42 AM
    Do you get that?

  4. #4
    Join Date
    Dec 2002
    Posts
    16
    Dave,

    Probably that's the only way!

  5. #5
    Join Date
    Jun 2003
    Location
    Guildford, UK
    Posts
    153
    use

    Code:
    formatDateTime(Now(), vbLongTime)

  6. #6
    Join Date
    Jan 2003
    Location
    Indonesia
    Posts
    38
    Please tell me what kind of database you are using.

    If it's MS SQL Server you can't remove it.
    If it's MS Access set the format to ShortTime

  7. #7
    Join Date
    Aug 2003
    Location
    London, United Kingdom
    Posts
    117
    of course you can set it in VB:

    FormatDateTime(now(), vbShortTime)
    or
    FormatDateTime(now(),4)

    These will both give you the time in 24-hour format (hh:mm)

  8. #8
    Join Date
    Jul 2003
    Location
    Strasbourg, France
    Posts
    173
    jux82,
    Do you get that?
    Please read the announcement, for your information the first post on the forum, about the rules on this forum.

    You should be glad there are folks who are kind enough to try to answer your question.

    Remember, we are doing you a favor. It's not our problem we are trying to solve.

    -Rogier Doekes

Thread Information

Users Browsing this Thread

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

Posting Permissions

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



Recent Articles