Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3485312
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:53:33+00:00 2026-05-18T10:53:33+00:00

I have a table that contains records, with a DATETIME column. I am writing

  • 0

I have a table that contains records, with a DATETIME column. I am writing a stored proc that will take a startTime and endTime and return all records between these two times. I want to force users to provide the time in a specific format (‘YYYY-MM-DDThh:mm:ss.nnn’). The reason being I don’t my table contains a lot of records, and I don’t want to limit the data retrieval to two points in time during the same day only (so they must provide times to a seconds granularity at least).

Is there anyway to enforce this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:53:33+00:00Added an answer on May 18, 2026 at 10:53 am

    Yes, but then you have to take the parameters as strings (varchar) instead of datetime, as the datetime values 2010-12-08 and 2010-12-08 00:00:00.000 are the same.

    You can verify that the length of the input strings meet the requirement, and then convert them to datetime using convert(datetime, startTime, 126).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table that contains millions of records. I'm altering one column data
I have a table that contains information pointing to files stored on a file
I have a table that contains information pointing to files stored on a file
I have an mnesia table t that contains records with a single field x
I have a folder that contains 1000+ sub folders. In each subfolder there are
I'm using a dataset. I have a table Adapter called PackageTableAdapter , which contains
I have a charting application that dynamically generates SQL Server queries to compute values
I'm looking for a solution where I have to create a set of records
I have a legacy database with the following table (note: no primary key) It
Is it best to (1) cache records from a table, or (2) a full

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.