How do I get time??

Results 1 to 3 of 3

Thread: How do I get time??

  1. #1
    Join Date
    Dec 1969

    Default How do I get time??

    My code are as follow:<BR><BR>order = "insert into Orders "<BR>order = order & " (OrderSeq, OrderNo, StationID, TimeIn) values "<BR>order = order & " (&#039"& oseq &"&#039, &#039"& onum &"&#039, &#039T1&#039, "<BR>order = order & gettime() & ")"<BR><BR>--------<BR>I can&#039t get a time.. what&#039s wrong with my code? Would appreciate any advice please. Thank you.

  2. #2
    Franco Guest

    Default RE: How do I get time??

    Robin<BR><BR>Try something along the lines of CONVERT(datetime, getdate(), 108).<BR><BR>Look up "CAST and CONVERT (T-SQL)" on "SQL Server Books Online" for more details.<BR><BR>Good luck,<BR><BR>Franco

  3. #3
    Dan Karas Guest

    Default RE: How do I get time??

    If you just want the system time appended to the &#039order&#039 string, try using the TIME() function instead of GETTIME<BR><BR>btw, a handy vbScript reference is at:<BR>

Posting Permissions

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