javascript,string,date,gettime
Duplicate of: JavaScript Date Object Comparison This is because ls_a is a different object than a when you call .getTime() you are getting a string which isn't compared as an object ...
sql-server,date,casting,order,group
If you really need to apply different formatting, you can do it using a derived table: select DATENAME(MM, [date]) + ' ' + CAST(DAY([date]) AS VARCHAR(2)) AS [DD Month], total_quantity from ( SELECT CAST([Datetime] AS DATE) AS [date], SUM(quantity) as total_quantity FROM Invoice_Itemized ii INNER JOIN Invoice_Totals it ON it.Invoice_Number...
Try backqoutes approach date -d "`date +\"%Y-%m-04 00:00:00\"`" +%s ...
If you are looking for the current date: WHERE TransactionDate = cast(getdate() as date) Or if you prefer ANSI standards: WHERE TransactionDate = cast(CURRENT_TIMESTAMP as date) ...
A format function that can return many different formats, can be expected to be quite slow. If you are happy with lubridate's year function, you could just use its (very simple) code: as.POSIXlt(x, tz = tz(x))$year + 1900 In general, you should avoid conversions between any types/classes and characters when...
c++,date,datetime,time,converter
There are 86400 seconds in a day, and 25569 days between these epochs. So the answer is: double DelphiDateTime = (UnixTime / 86400.0) + 25569; You really do need to store the Unix time in an integer variable though. ...
You're not quite handling timezones correctly // set the datetime in the EDT timezone $schedule_date = new DateTime("2015-06-22 13:00:00", new DateTimeZone("America/New_York") ); echo $schedule_date->format('Y-m-d H:i:s T'). " <br />"; // 2015-06-22 13:00:00 // change it to CDT $schedule_date->setTimeZone(new DateTimeZone('America/Chicago')); echo $schedule_date->format('Y-m-d H:i:s T'). " <br />"; // 2015-06-22 12:00:00 Demo...
Try saving it like this @user.brithdate = Date.new(params[:user]["birthdate(1i)"].to_i,params[:user]["birthdate(2i)"].to_i,params[:user]["birthdate(3i)"].to_i) @user.save ...
If data in your first table starts at A2, and your other column starts at D2, then use in E2 =VLOOKUP(D2,$A$2:$B$17,2,0) Copy down as needed....
What about using lubridate: x <- "01 Jan 2014" x [1] "01 Jan 2014" library(lubridate) dmy(x) [1] "2014-01-01 UTC" Of course lubridate functions accept tz argument too. To see a complete list of acceptable arguments see OlsonNames() Benchmark I decided to update this answer with some empirical data using the...
A workaround: x="2015_06_15" date -d "${x//_/} 12:00 +1 day" +%Y%m%d Output: 20150616 ...
javascript,date,datetime,angular-ui-bootstrap,milliseconds
getMilliseconds() returns the milliseconds part of the date, which is 0 is your case, since you constructed it from the date part (only) of a date. If I understand the requirement correctly, you're trying to get the date's representation as the number of milliseconds from the epoc. This is done...
Try UPDATE products JOIN (select @date := '2015-06-15 11:31:31') d SET dateAdded = (@date := @date - INTERVAL 1 DAY) ...
I would do this in a bit different manner. You can do it in a few ways, but maybe one SQL step and one datastep would be easiest. proc sql; create table lookup_lastdate as select customer_id as start, max(transaction_Date) as label, 'LASTDATEF' as fmtname from transaction_vw group by customer_id; quit;...
java,parsing,date,simpledateformat
I'm going to guess you're in the Eastern time zone and are confusing EDT with GMT.
echo strftime("%B %m, %Y", strtotime($crs_date1)); Might give you an error (this was just off the top of my head), so the format (first parameter of strftime) could be a bit wrong...
javascript,jquery,google-chrome,date,momentjs
The problem you are facing is most likely caused by the fact, that different browser (engines) implement different algorithms for sorting. The differences you experience are (at first glance) all focused on elements that have no difference (e.g. 0 returned from your sort-function) and thus have no deterministic sort-behavior described....
javascript,python,mongodb,date
If you can be assured of the format of the input date string AND you are just trying to get a count of unique YYYYMMDD, then just $project the substring and group on it: var data = [ { "name": "buzz", "d1": "2015-06-16T17:50:30.081Z"}, { "name": "matt", "d1": "2018-06-16T17:50:30.081Z"}, { "name":...
You can do it using NSCalendar method dateBySettingHour as follow: let df = NSDateFormatter() df.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z" if let dateFromString = df.dateFromString("2015-06-11T00:00:00.000Z") { let hour = 4 if let dateFromStringWithTime = NSCalendar.currentCalendar().dateBySettingHour(4, minute: 0, second: 0, ofDate: dateFromString, options: nil) { let df = NSDateFormatter() df.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z" let resultString...
From the documentation on tm we can see that: tm_year is years since 1900, not the current year number, i.e. it should be 115 this year. tm_mon is months since January (range 0-11), not the number of the month. So what you need is: std::cout << 1900 + nowTm->tm_year <<...
That's fairly correct, but you can adjust things to make them more realistic. "[0-2]?[0-9]:[0-5][0-9]" would be more realistic for time, as there is no 32:79 and what not. Also, the first can be optional to make 8:00 viable. [0-3]?[0-9]\/[0-1]?[0-9]\/[1-2][0-9][0-9][0-9] for date, as there can be no 42th of april and...
You can use fm before MM. Query SELECT TO_CHAR (SYSDATE, 'DD-fmMM-YYYY') AS today FROM dual; Output 17-6-2015 http://docs.oracle.com/cd/B28359_01/server.111/b28286/sql_elements004.htm#SQLRF00216 Add: To have all leading zero's removed: SELECT TO_CHAR (TO_DATE('01-01-2015', 'DD-MM-YYYY'), 'fmDD-MM-YYYY') AS today FROM dual; 1-1-2015 To remove leading zero from month number: SELECT TO_CHAR (TO_DATE('01-01-2015', 'DD-MM-YYYY'), 'DD-fmMM-YYYY') AS today FROM...
You don't really need JQuery for that. Plain javascript works as well: var date = new Date('2009-06-25T17:32:10.0000000'); console.log(date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds()); ...
c#,asp.net,sql-server,date,gridview-sorting
What happens if you change all of the filters to use 'LIKE': if (DropDownList1.SelectedValue.ToString().Equals("Start")) { FilterExpression = string.Format("Start LIKE '{0}%'", TextBox1.Text); } Then, you're not matching against an exact date (at midnight), but matching any date-times which start with that date. Update Or perhaps you could try this... if (DropDownList1.SelectedValue.ToString().Equals("Start"))...
The Cognos _days_between function works with dates, not with datetimes. Some databases, like Oracle, store all dates with a timestamp. On a query directly to the datasource, try using the database's functions to get this data instead. When possible, this is always preferable as it pushes work to the database,...
You just need to set the locale identifier to "pt_BR" // this returns the date format string "dd 'de' MMMM 'de' yyyy" but you still need to set your dateFormatter locale later on let br_DateFormat = NSDateFormatter.dateFormatFromTemplate("ddMMMMyyyy", options: 0, locale: NSLocale(localeIdentifier: "pt_BR")) let dateFormatter = NSDateFormatter() dateFormatter.dateFormat = br_DateFormat dateFormatter.locale...
Try this: MyCell.Value = Format(MyCell.Value, "mmmm dd, yyyy")...
Use the datetime module to work with dates, and strptime to parse strings that represent dates. >>> import datetime >>> cutoff = datetime.datetime.strptime('2015-2-19', '%Y-%m-%d') >>> a = datetime.datetime.strptime('2015-3-20', '%Y-%m-%d') >>> b = datetime.datetime.strptime('2015-1-2', '%Y-%m-%d') >>> c = datetime.datetime.strptime('2015-2-9', '%Y-%m-%d') >>> d = datetime.datetime.strptime('2015-2-09', '%Y-%m-%d') >>> a>=cutoff True >>> b>=cutoff False...
The month parameter to the Date constructor is 0 indexed, so 5 is June, which only has 30 days.
There are number of things wrong here. select DATEDIFF ^^^^ PostgreSQL doesn't have a datediff function. regress-> \df datediff List of functions Schema | Name | Result data type | Argument data types | Type --------+------+------------------+---------------------+------ (0 rows) I think you want the - operator, the extract function, justify_interval and...
java,date,datetime,datetime-format
You format string has a couple of mistakes: Y means the week year, not the year, which is y D means the day of the year. You should have used d, which means the day of the month. h means a 12-hour notation time of day. Since you have 14...
sql-server,date,datetime,sql-server-2014
You need to determine the format of the value you are converting before you can convert it. If it's simply between those two formats, you can simply search for - to determine it's format. I would also suggest storing the value in a datetime column as opposed to a varchar,...
Try using date function as <input type="date" value="<?php echo date('Y-m-d');?>"> ...
php,symfony2,date,fosrestbundle
If it's a DateTime() object, and I assume it is, you should be able to do: $entEmail->getCreatedAt()->format('Y-m-d H:i:s') More information on DateTime::format()...
You can just use the current year and month, and 01 as the day: SELECT count(DISTINCT ip) AS visitor_ip FROM visitor_list WHERE visited_date > CONCAT(DATE_FORMAT(NOW(),'%Y%m'), '01') This has the advantage that any index on visited_date will still be used correctly....
Thanks for help but I found the solution. We can simply enter the date by accepting input type='text' through HTML and store it directly in database and we can use this code while displaying data from database :- $date = date('d-m-Y', strtotime($_POST["date"])); Now we can see data in dd-mm-yy format...
Dates in Access needs to be surrounded by the # tags so that it recognizes the date you have passed. The other important factor to consider is that JET requires the date format to be mm/dd/yyyy as opposed to the normal dd/mm/yyyy. So your problem is because you are using...
If you insist on using your version, then it should be %m instead of %d, i.e.: $year = 2015; $month = 6; echo strftime('%m/%Y', strtotime('+1 month', mktime(0,0,0,$month,1,$year))); ...
javascript,angularjs,twitter-bootstrap,date,bootstrap-datetimepicker
There is a 'before-render' callback that will execute on every render of the datepicker, giving you a range of DateObjects appearing the current view. One of the properties of the DateObject is selectable. Setting that controls if the date can be chosen. For your scenario it is very easy to...
http://php.net/manual/en/function.date.php Second parameter of date function should be in Unix Time Stamp format....
This picker might suit your needs, further answers can be found regarding this familiar question.
internet-explorer,date,datepicker
You need to use a ployfill so that the input type DATE has a consistent behaviour in all browsers. You can use this webshim as a polyfill. Input type DATE is an HTML5 feature which is not supported by all browsers. In case you want to use HTML5 feature not...
You want DateTime::createFromFormat() (http://php.net/manual/en/datetime.createfromformat.php). Using that you can convert a string to a datetime any way you want to.
javascript,jquery,angularjs,date,momentjs
You could pass in 2 dates from your server: the existing timestamp, and the server's "now" timestamp. Then (assuming your server passes in its timestamp in the same format) you can use .from() instead of .fromNow() do: moment(time, "YYYY-MM-DD HH:mm:ss.SSSSSS").from(serverTime, "YYYY-MM-DD HH:mm:ss.SSSSSS"); If this is the only thing you're using...
python,string,perl,date,datetime
Here is the perl code that I think will work for you. #!/usr/bin/perl my $string = <STDIN>; chomp $userword; # Get rid of newline character at the end @arr = $string =~ /(passed|failed).+?([\d]+[yY].)?([\d]+(?:mo|MO).)?([\d]+[dD].)?([\d]+[hH].)?([\d]+[mM].)?([\d]+[sS])/g; $arr_len = scalar @arr; print "Result: $arr[0]\n"; for($i=1;$i<=$arr_len;$i=$i+1){ $arr[$i]=~/(\d+)([A-Za-z]*)/g; if ( $2 eq "y" | $2 eq...
excel,date,excel-formula,worksheet-function,array-formulas
Following 4 named ranges for simplicity in code: "Dividends": DividendDates (column A); DividendsPaid (column B) "AdjClose": StockDate (column A); StockPrice (column B) try (in column C in "Dividends": {=INDEX(StockPrice;MATCH(MAX(IF((StockDates<=A1);StockDates));StockDates;0))} Assuming that the dividend date for which you want to find the adjusted stock price is in cell A1. And copy...
java,date,elasticsearch,numberformatexception,spring-data-elasticsearch
Since the exception complains about a NumberFormatException, you should try sending the date as a long (instead of a Date object) since this is how dates are stored internally. See I'm calling date.getTime() in the code below: SearchQuery searchQuery = new NativeSearchQueryBuilder() .withQuery(matchAllQuery()) .withFilter(rangeFilter("publishDate").lt(date.getTime())).build(); ...
I have to admit the date/time functions in PHP are a bit cumbersome. That is the reason I always work with the Carbon toolbox when working with dates and times. And if you are using composer, including it is as easy as typing composer require nesbot/carbon in your console. It...
If I understand correctly, you want to receive one days worth of rows before a given date. I think that would be: SELECT t.* FROM table t WHERE date = (SELECT MAX(t2.date) FROM table t2 WHERE t2.`date` < '2015-06-07') ...
STR_TO_DATE works for me with a format of '%M %Y': mysql> select str_to_date('July 2015', '%M %Y'); +-----------------------------------+ | str_to_date('July 2015', '%M %Y') | +-----------------------------------+ | 2015-07-00 | +-----------------------------------+ 1 row in set (0.10 sec) Expand your question if there's some reason you can't do the same. To turn that into...
See Add> lines for changes that you need to make. SELECT Add> [VendasPOS_Cabecalhos].[DATA] as Day, COUNT(DISTINCT CASE WHEN MinProduto = 1 AND MaxProduto = 1 THEN PRENUMERO END) AS QtdCombustivel ,COUNT(DISTINCT CASE WHEN MinProduto <> 1 AND MaxProduto <> 1 THEN PRENUMERO END) AS QtdLoja ,COUNT(DISTINCT CASE WHEN MinProduto =...
excel,vba,excel-vba,date,user-input
Prefix the value with a single apostrophe and Excel will interpret it as a string. Eg '18/19/4561 Also, have you tried setting the cell format to Text...
Looks like you want to find a jobs record with the largest start_date that's also less than $delivery_date. Here's the query SELECT no FROM jobs WHERE `start_date` < $delivery_date ORDER BY `start_date` DESC LIMIT 1 If $delivery_date is set to 2010-02-08, the above query will return 198 like you expected....
You need to pick the hours as an individual variable, like shown below: set currentDate to current date set newHour to ((hours of currentDate) + 8) You can also use this for days, minutes and seconds. This will work. You can then use the variables to construct a new date...
Here a solution based on the excellent foverlaps of the data.table package. library(data.table) ## coerce characters to dates ( numeric) setDT(x)[,c("date1","date2"):=list(as.Date(date1,"%d/%m/%Y"), as.Date(date2,"%d/%m/%Y"))] ## and a dummy date since foverlaps looks for a start,end columns setDT(y)[,c("date1"):=as.Date(date,"%d/%m/%Y")][,date:=date1] ## y must be keyed setkey(y,id,date,date1) foverlaps(x,y,by.x=c("id","date1","date2"))[, list(id,i.date1,date2,date,price)] id i.date1 date2 date price 1: A...
What I finally did. I used Calender class and filled each item(year, month, day, hour, minute) while using date and time pickers. And used Calendar.getTime method to transform it to Date class that Parse.com understand. Calendar mDateTime = Calendar.getInstance(); ... mDateTime.set(Calendar.YEAR, selectedYear); mDateTime.set(Calendar.MONTH, selectedMonth); mDateTime.set(Calendar.DAY_OF_MONTH, selectedDay); ... meeting.put(ParseConstants.KEY_DATETIME, mDateTime.getTime()); So...
php,date,format,multilingual,jquery-validation-engine
I know that Zend has some of this logic in there zend_date (requires Zend Framework ^^), but I would just use a simple solution like this: (where you get the format from a switch statement) $date = $_POST['date']; $toConvert = DateTime::createFromFormat('d-m-Y', $date); switch($lang){ case 'de': $format = 'Y-m-d'; break; default:...
Your format is dd/MM/yyyy but date is 01-02-2014. Make date format matching expected input. Like this: DateFormat sdf = new SimpleDateFormat("dd-MM-yyyy",Locale.ENGLISH); ...
You don't need to worry about the format of the date when storing it. The database will simply store the date instance and you can use one of its functions to format it on retrieval. SQL Lite date functions: https://www.sqlite.org/lang_datefunc.html If you don't want to be tied to the functions...
jQuery is not for DateTime manipulation. It's for querying and manipulating DOM objects. For what you need, you can either implement that yourself, or use a specialized third-party library. Moment.js is pretty neat. Examples: moment().subtract(10, 'days').calendar(); // 06/12/2015 moment().subtract(6, 'days').calendar(); // Last Tuesday at 1:51 PM moment().subtract(3, 'days').calendar(); // Last...
The date format you used should be 'mm/dd/yyyy', not 'dd/mm/yyyy'.
Use the search method instead of match. Match compares the whole string but search finds the matching part.
Datetime format doesnt support locales, you have to convert to timestamp to use strftime Use LC_TIME in setlocale only to change the settings for time related formats <?php $now= new DateTime('now'); $date=$now->modify('+1 day'); setlocale(LC_TIME, 'bg'); echo strftime("%A", date_timestamp_get($date)); ...
Date is a property and does not accept parameters. You want DateSerial()....
sql-server,tsql,date,stored-procedures,cursor
This can easily be done with a recursive CTE: ;WITH cte AS ( SELECT @Start AS [Month] UNION ALL SELECT DATEADD(MONTH, 1, [Month]) FROM cte WHERE [Month] < @End ) SELECT [Month] FROM cte OPTION (MAXRECURSION 0) ...
You can point TZ to the timezone you want: $ TZ=Europe/Paris date Fri Jun 12 07:41:28 CEST 2015 ...
This is the Unix epoch time in milliseconds. x <- "/Date(1391514600000)/" x <- as.numeric(gsub("[^0-9]", "", x)) x # [1] 1391514600000 # from milliseconds to seconds: x <- x / 1000 as.POSIXct(x, origin="1970-01-01", tz="GMT") # [1] "2014-02-04 11:50:00 GMT" ...
Probably because dates in mongodb are stored in UTC, and you are using a different timezone on PHP Try setting this in the beginning of your PHP script to use UTC timezone: date_default_timezone_set('UTC'); ...
Use String Sub dural() Dim lastdaylastmonth As String lastdaylastmonth = Format(DateSerial(Year(Date), Month(Date), 0), "dd/mm/yyyy") MsgBox lastdaylastmonth End Sub ...
If you read on the R help page for as.Date by typing ?as.Date you will see there is a default format assumed if you do not specify. So to specify for your data you would do nmmaps$date <- as.Date(nmmaps$date, format="%m/%d/%Y") ...
sql,sql-server-2008,date,datetime,visual-studio-2008
Use datepart year, so your not performing a search on a function I'd reccomend setting up some variables that wil beset prior to the main query running, so your sarg is against a date. declare @fiscalStart = select cast('07/01/' + Cast((datepart(year, getdate())-1) as varchar(4)) as datetime) declare @fiscalEnd = select...
You can use dateutil by installing pip install python-dateutil Then >>>from dateutil import parser >>>mydate = "June 3, 2001" >>>str(parser.parse(mydate).date()) '2001-06-03' ...
This is what I meant: declare @currentDate datetime,@enddate datetime set @currentDate = '20150601' set @enddate='20150605' while (@currentDate <= @enddate) begin select @currentDate as currentdate select @currentDate = dateadd(DAY,1,@currentDate) end ...
sql,date,ms-access,compare,equals
The Date/Time value #2015.06.11# includes a time component, which is 12:00 AM. If any of your stored values for that date include a time component other than 12:00 AM, they will be excluded by your WHERE clause. Use a modified WHERE clause to retrieve all the rows for your target...
Laravel using the strtotime and checkdate functions to validate a date. How the validateDate function of Laravel works? An example: strtotime('30-2-2015'); // returns a timestamp checkdate(2, 30, 2015); // returns false // laravel raises an error Therefore, the value of $data['date_of_birth'] should be a string in a particular format. public...
Let's say you want the see the number of sensor data point for the last week SELECT DATE(timestamp) dt, COUNT(1) datapoints FROM sensor WHERE timestamp >= DATE(NOW()) - INTERVAL 1 WEEK + INTERVAL 0 SECOND GROUP BY DATE(timestamp); To see this month by day SELECT DATE(timestamp) dt, COUNT(1) datapoints FROM...
Please, see: Format function. Usage: 'UserForm has a TextBox named TxtDate Dim myDate As Date, sDate As String myDate = Me.TxtDate 'DateSerial(2014,12,11) sDate = Format(myDate, "Short Date") 'or sDate = Format(myDate, "yyyy/MM/dd") ...
The reason that they are not working is because you use the wrong data type in the first place. Never use Varchar to store date or values. Always use the appropriate data type for your data (in this case, Date seems to be what you are looking for, assuming your...
Try this PHP code: <?php $scheduleStartDate = '2015-06-20'; $scheduleEndDate = '2015-06-25'; $Date = getDatesFromRange($scheduleStartDate, $scheduleEndDate); $Date = substr($Date, 0, -1); function getDatesFromRange($start, $end){ $startDate = new DateTime($start); $endDate = new DateTime($end); $endDate->modify('+1 day'); $daterange = new DatePeriod($startDate, new DateInterval('P1D'), $endDate); $result = ''; foreach($daterange as $date){ $result .= '"'.$date->format("j-n-Y").'",'; }...
date,model-view-controller,html-select
Maybe a better way to do this would be to define a property in your model that returns IEnumerable<SelectListItem> (in your model class): public DateTime SelectedDate {get;set;} public IEnumerable<SelectListItem> SeasonDates { get { foreach (var item in seasonDates) yield return new SelectListItem() { Text = item.ToShortDateString(), // or apply your...
You need to reset the date, or they will be references of the same Date object. var dates = []; getDateRange(); function getDateRange() { var today = new Date(); var date; for (var i = 0; i <= 59; i++) { date = new Date(); date.setDate(today.getDate() + i); console.log(date); dates.push(date);...
data2 is a String. before is a method of Date class. You should parse data2 into a Date instance and call date2.before(now) (assuming date2 is a Date)....
You should try it this way date -j -f "%Y-%m-%d %H:%M" "2015-06-11 12:39" +%s. I've just tried it myself. The commands for date are a bit different on macs than on a Linux based operating system....
Why can't we just use the HTML5 required? <input type="date" name="date" required> ...
When you cast a date to a tamestamp it's set to midnight, then you can add or subtract an interval: -- tomorrow minus a millisecond CAST(CURRENT_DATE +1 AS TIMESTAMP(3)) - INTERVAL '0.001' SECOND -- or today plus almost 24 hours CAST(CURRENT_DATE AS TIMESTAMP(3)) + INTERVAL '23:59:59.999' HOUR TO SECOND ...
If you want parse the mongodb result, use moment.js to convert String to date : http://momentjs.com/. var date = moment("24th June 2015", "Do MMM YYYY"); // you've got a moment Date If you want convert this MongoDb String to date for queries, convert a date with monent.js to this String...
Try setting the date format explicitly with the SQL statements using TO_DATE, e.g. String query = "INSERT INTO STUDENTS VALUES (?,?,?,TO_DATE(?,'YYYY-MM-DD'),?,?,?,?)"; Then ensure the date format in the Java variable matches. Change the format in the TO_DATE as required if different....
First, a 'time' without a date is not valid. Think about daylight saving time etc. One solution is maybe to create two date objects (with a fixed date) and use them for your calculation. Or parse the string and use TimeUnit to work with the values. Keep in mind that...
You need proper date formatting: strFilterNaklady = "[datNakladDatum] Between #" & Format(datRokMesiacOd, "yyyy\/mm\/dd") & "# And #" & Format(datRokMesiacDo, "yyyy\/mm\/dd") & "#" Also, this can be reduced to: datRokMesiacDo = DateSerial(Year(cmbStavK), Month(cmbStavK) + 1, 0) 'end Date ...
Use =SUMPRODUCT((K2:NK2="")*(K1:NK1<=I2)*(K1:NK1>=G2)) if you want to include the start and end date, if you want to include them, use =SUMPRODUCT((K2:NK2="")*(K1:NK1<I2)*(K1:NK1>G2)).
javascript,angularjs,date,datepicker,bootstrap-datepicker
As explained in toISOString() documentation, this function returns the date (timestamp) in the zero UTC offset. The timestamp you are providing is in the "India Standard" time zone. So that those two dates are representing the same exact moment, but one is showing the time at the Greendwich meridian and...
You have to declare a string variable, and it will work! private void button1_Click(object sender, EventArgs e) { string your_string = dateTimePicker1.Value.ToString(); try { this.examinesTableAdapter.FillBy(this.dbSpinDataSet.examines, your_string, textBox2.Text, textBox3.Text); } catch (SystemException ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } } ...