format

Need to format dates in dynamically built WPF DataGrid.

We are binding an unknown result set to a WPF DataGrid at run time. Some of our columns are going to contain DateTime values and we need to properly format these date time fields. Without knowing which columns are going to be DateTime fields at design time, how are we able to format the columns at runtime? We are using a DataTable's D...

How I can check for a valid date format in Perl?

Hi, I am getting a date field from the database in one of my variables, at the moment I am using the following code to check if the date is in "yyyy-mm-dd" format if ( $dat =~ /\d{3,}-\d\d-\d\d/ ) My question, is there a better way to accomplish this. Many Thanks ...

What's the issue with vcard duplicates?

No software I've seen is able to synchronize contacts between Outlook and my cell without creating duplicates. One would think that someone had synchronization in mind when they thought up the format. Is it impossible for programmers to work around this problem? ...

Setting Date format yyyyMMdd through specify Culture Name

I want to set user date format yyyyMMdd using culture name. Which culture name have to specify to accomplish this? ...

Numeric Format String : double to time

Hi I have a double value in seconds and i would like to use a Numeric Format String to display it as mm:ss or hh:mm:ss. Is this possible? Havent found anything about it on MSDN? The reason is that we use a Telerik Chart that displays our data and since I cant change the uderlying format I have to hook the format string into their char...

what's the most easy-to-parse format for PHP?

In my PHP file,I'm reading out bulk of information using query like below: SELECT GROUP_CONCAT(CONCAT('<comment><body><![CDATA[',body,']]></body>','<replier>',if(screen_name is not null and !anonymous,screen_name,''),'</replier>','<created>',created,'</created></comment>') SEPARATOR '') FROM idiscussion LEFT JOIN ...

django filter format for date

Hello, year_id (2004 etc) is a dropdown box on the template. The users selects a year and this is retrieved as year_id in the view. I need to select publications based on year from a field called grantstartdt which is in the format 2008-01-01. The error is: int() argument must be a string or a number, not 'Year' year_id = request....

Oddity with ToString() custom number formatting

I am trying to convert numbers in the form 123456 to 123,456 which I find easy enough by using the .NET ToString() method with a custom format of N0. However in one case of data I am getting strange formats whilst using this method. In this case I am generating a DataTable dynamically for my input table to test the code. DataTable dt ...

How can I analyze a closed format (e.g. doc or vce)?

I want to study the .vce format. It's a binary format and it seems more complicated than a simple object serialization. Does it exist any tool or technique to analyze a binary format? ...

expression engine: start_on

I am using the following within the exp:weblog:entries tag: start_on="{current_time format='%Y-%m-%d %H:%i'}" I want to use this so that when the date of an event is past the current date then the event will disappear from the page. The problem is that I have some events that only have an entry date (ex. April 04, 2009) and others tha...

Java based OCR SDK/API

Are there any good OCR (optical character recognition) SDK or APIs in Java which will be able to convert TIFF files to txt files (or even html is good enough) with some sort of format retention? The challenge is to read a typical news magazine article and know that it has a header and certain number of paragraphs and pictures. I am Ok w...

TIFF image file format

Hello, I am working on TIFF images for image compression. I want to know how is the actual raw image data i.e. R,G,B components organised/stored in the TIFF file. Is it stored as G0B0R0G1B1R1... (1 byte each for each color component, all components intereleaved) or is it some other way viz. planar format or something else? Thank...

The format of message was invaild in SQL WebMerge Replication

Hi, We are looking into web synchronization between SQL2005 standard & offline clients using Express2005. When I create subscription and synchronize for first time it works fine. But when I reintialize the subscription and synchronize it is giving me below error. "The format of a message during Web synchronization was invalid. Ensure ...

How to use the GCC attribute 'format'?

Hello, Here is a little piece of code: #include <stdio.h> #include <stdarg.h> void MyPrintf(char const* format, va_list args); void MyVariadicPrintf(char const* format, ...); void MyPrintf(char const* format, va_list args) { vprintf(format, args); } void MyVariadicPrintf(char const* format, ...) { va_list args; va_start(...

MS-access wrong date format when converting field from text to date/time

Hi, I have an access database given to me where all the dates are stored in a text field in the format mm/dd (eg: 3/13/2009 12:20:36 AM) I want to convert the field to a date/time but access formats it as dd/mm which makes it so that if the day is bigger then 12 or not the converted date might be wrong. Example with the current forma...

Format a double value like currency but without the currency sign (C#)

Hi, I feed a textbox a string value showing me a balance that need to be formatted like this: ###,###,###,##0.00 I could use the value.ToString("c"), but this would put the currency sign in front of it. Any idea how I would manipulate the string before feeding teh textbox to achieve the above formatting? I tried this, without succe...

WPF GridView: Changing the DateTime formatting for bound DataTable

We're using a WPF GridView that is dynamically bound to a DataTable (which in turn is the direct result of a DB query). This basically works fine and displays whatever the results from the DB query are in a nice table. Now the problem is that some of the results contain DateTime columns, and the date displayed is always in US format and...

Remove day name from DateTimePicker

I have a DateTimePicker and it is currently displaying "Friday, June 26 2009" How would I change it so it displays "June 26 2009"? ...

Excel Interop: Formatting Footers

I am creating an Excel Worksheet from C# using Microsoft.Office.Interop.Excel, and I have not been able to get the footers the way the User wants them. 1) How can I put footer text in BOLD? 2) How can I put the page number in the footer? (Putting @"Page @[Page]" in as text does not work.) Possible? Not Possible? ...

Format numbers in javascript

Is there a simple way to format numbers in javascript, similar to the formatting available in C# (or VB.NET) via ToString("format_provider") or String.Format()? ...