Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2009
    Posts
    1

    Unanswered: convert string into datetime

    Hi

    I am trying to convert a string into a date time

    '2009-06.13.16:56:50' into

    06/13/2009 4:56PM

    and i need to store it as datetime in database table

  2. #2
    Join Date
    Aug 2008
    Posts
    12
    select DATEFORMAT( datetime('2009-06.13.16:56:50'), 'mm/dd/yyyy hh:mm aa' )

  3. #3
    Join Date
    Mar 2008
    Posts
    22
    Hi,

    You can also use the substring command
    Ex.
    select substring( '20090311', 5, 2 )

    Output will be 03

Posting Permissions

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