rohanraj Posted August 15, 2013 Share Posted August 15, 2013 Having problem in inserting date in n_date column having field date... it stores date but failed to store date having days more than 30 as bikram sambat has 32 days in some month .... n it is not similar as A.D. date ... i need to store B.S. date but failed to do that..... i have done each n everything to get it work.... but still don't get the solution.... as i have get many solutions from this site i wish to get solved it here .....nepali_calendar.phptoday.php Quote Link to comment https://forums.phpfreaks.com/topic/281184-how-to-insert-bs-date-in-mysql/ Share on other sites More sharing options...
Barrikor Posted August 15, 2013 Share Posted August 15, 2013 (edited) Looking at your files, it looks like converting directly between the Gregorian Calender (in English) and the Nepali Calender, is a lot of hard work... If you aren't going to use any dates before 1970, what about using the Unix Timestamp, like in PHP's time() function? Then you can just store the date in the database as an integer, and you'd convert the timestamp into dates in both calenders Edited August 15, 2013 by Barrikor Quote Link to comment https://forums.phpfreaks.com/topic/281184-how-to-insert-bs-date-in-mysql/#findComment-1445101 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.