Questions tagged [datetime]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
2 answers
460 views

Finance datetime

I wish to add the date of the transaction in a DB (SQLite) date = db.execute("""SELECT date('now')""")[0]["date('now')"] But the date is only in format: 2020-02-18 I need YYYY-MM-DD-HH-SS I've try:...
user avatar
  • 53
0 votes
1 answer
86 views

Pset7 Finance Buy Runtime Error - Date

When I try to update the users portfolio I receive a runtime error from passing in 'when' as date('now'). Please can someone tell what I should be doing. Here is part of my buy function code. # ...
user avatar
  • 135
0 votes
1 answer
185 views

pset7 I can't use usd() and have a problem with datetime method

1- pset7 I can't use usd() because I still need the values(int) to select the number for calculation 2- I used datetime.datetime.now()and it gives me just date without the time. anyone can help me :) ...
user avatar
0 votes
0 answers
144 views

Pset7, history,date

In Pset7, history, I'm trying to sort the data by date, I tried ORDER BY but it gave me"syntax error near when"(when is the date column name, and its data type is: DATETIME) .. what is the right way ...
user avatar
  • 9
0 votes
1 answer
333 views

pset7, buy function, date

in pset7, I'm using the date function to store the time of buying, I did some Google search but I keep having this error:undefined variable'date', could someone help me figure out what's wrong? @app....
user avatar
  • 9
0 votes
1 answer
587 views

pset7 question about tables in buy

Greetings I am having trouble understanding how tables in sql work in buy. So from reading other materials (pset7 buy - ON DUPLICATE KEY syntax question) am I suppose to always make a new row even ...
user avatar