Forum Discussion
validate current timestamp between given start and end date times
- 9 years ago
Don't worry dude we have another one way
Time Difference =
var Start_Date = NOW() -- Replace Now() with start_date
var end_Date = NOW() -- Replace Now() with end_datevar Start_time = FORMAT(Start_Date,"HH:mm:ss")
var End_time = FORMAT(end_Date,"HH:mm:ss")return FORMAT( TIME(LEFT(Start_time,2) ,MID(Start_time,4,2),RIGHT(Start_time,2)) -
TIME(LEFT(End_time,2) ,MID(End_time,4,2),RIGHT(End_time,2)) , "HH:mm:ss"
)I hope it will give u the time difference dude..
let me know any further doubts . cheers
Don't worry dude we have another one way
Time Difference =
var Start_Date = NOW() -- Replace Now() with start_date
var end_Date = NOW() -- Replace Now() with end_date
var Start_time = FORMAT(Start_Date,"HH:mm:ss")
var End_time = FORMAT(end_Date,"HH:mm:ss")
return FORMAT( TIME(LEFT(Start_time,2) ,MID(Start_time,4,2),RIGHT(Start_time,2)) -
TIME(LEFT(End_time,2) ,MID(End_time,4,2),RIGHT(End_time,2)) , "HH:mm:ss"
)
I hope it will give u the time difference dude..
let me know any further doubts . cheers
Thanks Baskar