..... for (i = start_from; i < finish_by; i++) { var todayObj = new Date(); var current_hour = todayObj.getHours(); console.log(current_hour); var dateObj = new Date(date); if((dateObj.toDateString() == todayObj.toDateString()) && i<=current_hour){ /*no print*/ }else{ var time_in_12 = contvert_in_12_hours_time(i,(i+1)) content += '<div class="col-md-10 col-md-offset-1 avail_time">\n\ <input title="Book time slote" type="button" class="set_appoint_time unselected_time" value="'+time_in_12+'">\n\ <span class="start_from">'+i+'</span>\n\ <span class="finish_by">'+(i+1)+'</span>\n\ </div>'; } } .... function contvert_in_12_hours_time(start_from,finish_by){ if(finish_by>=12){/*for showing AM ,PM*/ if(finish_by==12){ var content = start_from+' AM to '+finish_by+' PM'; }else if(start_from<=12 && finish_by>12){/*for converting timing 12 hours*/ if(start_from<12){ var content = start_from+' AM to '+(finish_by-12)+' PM'; }else if(start_from==12){ var content = start_from+' PM to '+(finish_by-12)+' …

Member Avatar
+0 forum 0

Hey all, Came across this site while scouring the web for a solution to my problem. All of the answers on here seem very helpful and non judgmental. That is hard to come by in a lot of programming forums, so thanks. My Question. I am using VS 2008 and have a DataGridView linked to a SQL table. One of the columns in my table is a dueDate column. On my form I have a set of check boxes and one of them is set to display all rows that have a dueDate > today's date (well that's what I …

Member Avatar
Member Avatar
+0 forum 6

Oka. So i have this rather simple program, basically i want it to be able to count the number of hours it has been open. My problem is that i am trying to use [CODE]import java.util.date; Calendar calendar = Calendar.getInstance();[/CODE] And apperently this does not update after the program has been launched. is there a work around? or am i just using it wrong? Basically what im trying to do (for the lack of knowlagde on how to do it better =) ): [CODE] int time; int time2; time = calendar.get(Calendar.SECOND); String containerInput; containerInput = reader.readLine(); /*input to keep the …

Member Avatar
Member Avatar
+0 forum 2

I have two datatable having same column names. i am trying to copy data of one data table to another. The destination datatable has one datetime column and source datatble has datecolumn. but my code is not working. dtequityData is source datatable drnew is new row created for destination table foreach (DataRow dr in _dtequityData.Rows) { drnew["fldDate"] =Convert.ToDateTime((dr["flddate"]).ToString(); } Thanks in advance...

Member Avatar
Member Avatar
+0 forum 1

[CODE]Traceback (most recent call last): File "C:\Documents and Settings\Administrator\My Documents\textprocessing\test files\keep 6 latest file.py", line 37, in <module> shutil.move(file_name, dst_file) File "C:\Python31\lib\shutil.py", line 278, in move copy2(src, real_dst) File "C:\Python31\lib\shutil.py", line 113, in copy2 copyfile(src, dst) File "C:\Python31\lib\shutil.py", line 66, in copyfile fsrc = open(src, 'rb') IOError: [Errno 2] No such file or directory: 'Copy of New Text Document.txt'[/CODE] i recive this error when running my code what does the code do?? - it works though a directory and makes a list of all text files and sorts them by the modifed date once its sorted it then takes the …

Member Avatar
Member Avatar
+0 forum 2

Hey guys, thanks a lot for the help. Here's the code I have for going through each file in a directory I specify: [CODE] for root, dirs, files in os.walk('%s'%(DOSEnvironVar)): for this_file in files: if this_file.find('.csv')>-1: filepath = os.path.join(root, this_file) currentfile=open(filepath,'r') filelines = currentfile.readlines() [/CODE] I would like to add a way to if the file was created (or modified) in the past three hours. So a change like this (pseudo code): [CODE] if this_file.find('.csv')>-1 and this_file was created in the past three hours: filepath = os.path.join(root, this_file) [/CODE] I'm not very good with the time module yet, which is …

Member Avatar
Member Avatar
+0 forum 1

Can somebody plz tell me why this function of php now() doesn't work properly. Someday it doesn't work properly like I have date validation that compares two dates one of server and another of user given date. But today it doesn't compare so results were null. So can anybody tell me the permanent solution for this. Because time and again these are burning problem that I face regarding dates and times. So plz help from anyone, highly appreciated. Thanks in advance:)

Member Avatar
Member Avatar
+0 forum 1

I Want To Search Date From .mdb Database file, Table Name is Purchase, and The Field is Purchase Date, its Type is DateTime and Formate is ShortDate in MS Access Database File, I Conceted it to Vb.net Form, and Tryed to Search Date, but it Returns Error. the Code to Connect and Search Date Record is as Follows [CODE] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click PurchaseConn.ConnectionString = "Provider=Microsoft.jet.oledb.4.0; Data Source=" & Pth & "\DisplayCenterData.mdb; User Id=admin; Password=;" 'pth is Variable for Project Folder's Path PurchaseSql = "Select * from PUrchase where PurchaseDate =" & …

Member Avatar
Member Avatar
+0 forum 4

Hi guys! I want the user to enter the day, month and year in a dd/mm/yyyy format. But what i've written doesn't seem to work. Code: [CODE]char d[2]; char m[2]; char y[4]; cout << "Day:"; gets(d); cout << "Month:"; gets(m); cout << "Year:"; gets(y); [/CODE] In the output, it doesn't stop for Day, Goes for month.. and suddenly program crashes at Year. Any Help?

Member Avatar
Member Avatar
+0 forum 2

[CODE] maxDays = calendar.getActualMaximum(calendar.DAY_OF_MONTH); System.out.println(maxDays); [/CODE] When looking through the javadocs it seems like this would work but it apparently doesn't. Any help on figuring why it doesn't or another way would be appreciated

Member Avatar
Member Avatar
+0 forum 4

Hi I am a J2ME developer I am new to Dani Web. I am using chartapi.finance.yahoo.com to calculate and display chart. My questions is how to convert TIMESTAMP value to a Java Date or Calendar Object ?..... For Eg: URL GIVEN BELOW [URL="http://chartapi.finance.yahoo.com/instrument/1.0/aapl/chartdata;type=quote;range=1d/csv/"]http://chartapi.finance.yahoo.com/instrument/1.0/aapl/chartdata;type=quote;range=1d/csv/[/URL] Its output will be uri:/instrument/1.0/aapl/chartdata;type=quote;range=1d/csv/ ticker:aapl unit:MIN timezone:EST gmtoffset:-18000 previous_close:199.2300 Timestamp:[COLOR="Red"]1265207400,1265230800[/COLOR] labels:[COLOR="red"]1265209200,1265212800,1265216400,1265220000,1265223600,1265227200,1265230800[/COLOR] values:Timestamp,close,high,low,open,volume close:194.7100,200.1600 high:194.9800,200.2000 low:194.4200,200.0300 open:194.7599,200.1600 volume:7100,678600 [COLOR="Red"]1265207400[/COLOR],195.2600,195.4000,195.1000,195.1700,273700 [COLOR="red"]1265207460[/COLOR],195.0400,195.2700,194.9200,195.2300,127500 ......... [B]How to convert values hilighted in[COLOR="Red"] RED [/COLOR]to Date or calendar Object?... I Tried this [CODE] Calendar cal=Calendar.getInstance(); cal.setTime(new Date(1265207400)); [/CODE] But unfortunatly cal value is set to 15/Jan/1970 15:26:47.[/B]:ooh: Danni Gurus please help....:| Thanks in …

Member Avatar
Member Avatar
+0 forum 4

I am developing a Lease Information Management System. This system is related with Land rent Contracts. Every contract have a Begining date and Expiry date. For example Begingin Date is: 01-08-06 And Expiry Date is : 31-07-16 I have store these 2 dates in DB. Payment will be given to the owner of the land evey year in advance. Now I have to calculate the year ranges for these two dates (for example year 1 = 01-08-06 to 31-07-07 ) Now there are 10 years in this example. First of all i have to obtain all the duration from these …

Member Avatar
Member Avatar
+0 forum 3

Hello, I am witting some software to interact with a mail order manager. Issue is they use a strange date/time format that they store as text in the DB, from what i guessed its YYYYMMDDHHMMSSNNN right now im using this function to get it into C# as a standard date. [CODE] private static DateTime ProcessMwTime(string mwTime) { //Mailware Date Format //YYYY/MM/DD HH:MM:SS.NNN //20090916114135766 //2009/09/16 11:41:35.766 DateTime thisDate = new DateTime(int.Parse(mwTime.Substring(0, 4)), int.Parse(mwTime.Substring(4, 2)), int.Parse(mwTime.Substring(6, 2)), int.Parse(mwTime.Substring(8, 2)), int.Parse(mwTime.Substring(10, 2)), int.Parse(mwTime.Substring(12, 2)) ); return thisDate; }[/CODE] Now the question, is there a better way to do this. to me it looks …

Member Avatar
Member Avatar
+0 forum 6

The End.