royst88
Pine Script Scholar
Pine Script Scholar
Posts: 4
Joined: November 6th, 2023
Contact: TradingView Profile

get a time @ date input

hi my name is royston thank you for this free course just to see if we like it,

im stuggling on getting a time and date i was woundering if i am doing anything wrong thanks in advance


//get and date input
inputtime=input.time(title="time", defval=timestamp("01 Jan 2000 13.30 +0000"))

this is the message im getting its to do with the timestamp

Error at 28:53 timestamp(s): unrecognized datetime format

thank you

Steve Burman
Moderator
Moderator
Posts: 109
Joined: January 13th, 2023

Re: get a time @ date input

Try using a colon rather than a period for the timestamp

inputtime=input.time(title="time", defval=timestamp("01 Jan 2000 13:30 +0000"))

royst88
Pine Script Scholar
Pine Script Scholar
Posts: 4
Joined: November 6th, 2023
Contact: TradingView Profile

Re: get a time @ date input

thank you very much

Return to “Pine Script Q&A”