• Top Members
    Reps
    Posts
  • 834 Replies
    2585 Replies
  • 713 Replies
    2021 Replies
  • 331 Replies
    1928 Replies
The site is still being updated (as of 14th Jan 2018 6PM GMT) but can be used in the meantime.

Sqlite MultiDate?

Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Locked
User avatar
Dummy1912
VIP - Donator
Posts: 1947

Sqlite MultiDate?

Fri Sep 29, 2017 6:56 pm

Hello,

i like to show the start date till end date
but it only shows all from 10/1/2017 and 10/12/2017 and not between it :(
i like to show from 10/1/2017 till end 10/12/2017
so also everything between /1/ till end /12/

Code: Select all

Dim whereClause As String = "transactions.setdate BETWEEN '10/1/2017' AND '10/12/2017'"

  Dim tblFields As SQLiteDataReader = DataBase.executeQuery("SELECT " & attributes & " FROM transactions " & fromClause & " WHERE " & whereClause & ";")
Thanks :)

User avatar
Dummy1912
VIP - Donator
Posts: 1947

Re: Sqlite MultiDate?

Sun Oct 01, 2017 11:16 am

Wellllll
it even seems when you have the wrong date display in your own db
you can't even show it properly

so my db has now yyyy-MM-dd and still don't show all my data
it only shows from the date i added in the between

so it only show the dates from 2017-10-01 and 2017-10-12
why not all till 2017-10-12 ?

Anyone please

User avatar
CodenStuff
Site Admin
Posts: 4348

Re: Sqlite MultiDate?

Sun Oct 01, 2017 11:38 am

Rough but have you tried it like:

Code: Select all

  Dim tblFields As SQLiteDataReader = DataBase.executeQuery("SELECT " & attributes & " FROM transactions " & fromClause & " WHERE date BETWEEN" & "10/1/2017" &  " AND " &  "10/12/2017" &" ;")

Formula should work like:

Code: Select all

"SELECT thisdata FROM yourtable WHERE date BETWEEN "2017-10-1" AND "2017-10-12";"
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.

User avatar
Dummy1912
VIP - Donator
Posts: 1947

Re: Sqlite MultiDate?

Sun Oct 01, 2017 11:42 am

Hi Codenstuff,

Problem solved :D

it has with my db i had to set all my dates to yyyy-MM-dd and then search for 2017-10-01 and 2017-10-12 and works like a charm :)

Thanks

Locked

Return to “Coding Help & Support”