Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I use date timpicker to show date time. Then store it to database. But I must in long fomat. I can get value as 2010-10-29 10:40:23 but how I get long value to store to database. Thanks

share|improve this question
    

2 Answers 2

convert this date value to long in your angular controller.

var longDate = new Date("2010-10-29 10:40:23").getTime();
share|improve this answer
    
i don't think he meant "long" as in "long integer"... –  dandavis 22 hours ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.