1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Formatting Current Time/Date as YYYY-MM-DD 13:24:00

Discussion in 'Software Development' started by irosen516, Feb 11, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. irosen516

    irosen516 Thread Starter

    Joined:
    Dec 9, 2002
    Messages:
    23
    Is there a function that would allow me to display the current time and date in this format:

    YYYY-MM-DD 13:24:00? I'm tired = Now() and =GetDate() but they dont seem to work. Thank you!
     
  2. Anne Troy

    Anne Troy

    Joined:
    Feb 14, 1999
    Messages:
    11,746
    First Name:
    Anne
    What program are you using?
     
  3. Snake~eyes

    Snake~eyes

    Joined:
    Apr 18, 2002
    Messages:
    640
    I'm not sure what language you're talkina bout but if its php heres how to do it

    PHP:
    $stuff date("Y-m-d G:i");
    echo(
    $stuff);
     
  4. irosen516

    irosen516 Thread Starter

    Joined:
    Dec 9, 2002
    Messages:
    23
    I'm sorry. I forgot this wasn't a VB forum. I'm trying to do this in Visual Basic. Thanks!
     
  5. TimCottee

    TimCottee

    Joined:
    Oct 10, 2001
    Messages:
    186
    In VB it is dead simple:
    Code:
    Msgbox Format(Now(),"yyyy-mm-dd hh:nn:ss")
    
     
  6. irosen516

    irosen516 Thread Starter

    Joined:
    Dec 9, 2002
    Messages:
    23
    Perfect! Thank you!

    :D
     
  7. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/118290

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice