lunes, diciembre 26, 2005

String de formato para DateTime

Format Pattern

Description

d, %d

The day of the month. Single-digit days will not have a leading zero. Specify "%d" if the format pattern is not combined with other format patterns.

dd

The day of the month. Single-digit days will have a leading zero.

ddd

The abbreviated name of the day of the week, as defined in AbbreviatedDayNames.

dddd

The full name of the day of the week, as defined in DayNames.

M, %M

The numeric month. Single-digit months will not have a leading zero. Specify "%M" if the format pattern is not combined with other format patterns.

MM

The numeric month. Single-digit months will have a leading zero.

MMM

The abbreviated name of the month, as defined in AbbreviatedMonthNames.

MMMM

The full name of the month, as defined in MonthNames.

y, %y

The year without the century. If the year without the century is less than 10, the year is displayed with no leading zero. Specify "%y" if the format pattern is not combined with other format patterns.

yy

The year without the century. If the year without the century is less than 10, the year is displayed with a leading zero.

yyyy

The year in four digits, including the century.

gg

The period or era. This pattern is ignored if the date to be formatted does not have an associated period or era string.

h, %h

The hour in a 12-hour clock. Single-digit hours will not have a leading zero. Specify "%h" if the format pattern is not combined with other format patterns.

hh

The hour in a 12-hour clock. Single-digit hours will have a leading zero.

H, %H

The hour in a 24-hour clock. Single-digit hours will not have a leading zero. Specify "%H" if the format pattern is not combined with other format patterns.

HH

The hour in a 24-hour clock. Single-digit hours will have a leading zero.

m, %m

The minute. Single-digit minutes will not have a leading zero. Specify "%m" if the format pattern is not combined with other format patterns.

mm

The minute. Single-digit minutes will have a leading zero.

s, %s

The second. Single-digit seconds will not have a leading zero. Specify "%s" if the format pattern is not combined with other format patterns.

ss

The second. Single-digit seconds will have a leading zero.

f, %f

The fraction of a second in single-digit precision. The remaining digits are truncated. Specify "%f" if the format pattern is not combined with other format patterns.

ff

The fraction of a second in double-digit precision. The remaining digits are truncated.

fff

The fraction of a second in three-digit precision. The remaining digits are truncated.

ffff

The fraction of a second in four-digit precision. The remaining digits are truncated.

fffff

The fraction of a second in five-digit precision. The remaining digits are truncated.

ffffff

The fraction of a second in six-digit precision. The remaining digits are truncated.

fffffff

The fraction of a second in seven-digit precision. The remaining digits are truncated.

F, %F

Displays the most significant digit of the seconds fraction. Nothing is displayed if the digit is zero. Specify "%F" if the format pattern is not combined with other format patterns.

FF

Displays the two most significant digits of the seconds fraction. However, trailing zeros, or two zero digits, are not displayed.

FFF

Displays the three most significant digits of the seconds fraction. However, trailing zeros, or three zero digits, are not displayed.

FFFF

Displays the four most significant digits of the seconds fraction. However, trailing zeros, or four zero digits, are not displayed.

FFFFF

Displays the five most significant digits of the seconds fraction. However, trailing zeros, or five zero digits, are not displayed.

FFFFFF

Displays the six most significant digits of the seconds fraction. However, trailing zeros, or six zero digits, are not displayed.

FFFFFFF

Displays the seven most significant digits of the seconds fraction. However, trailing zeros, or seven zero digits, are not displayed.

t, %t

The first character in the AM/PM designator defined in AMDesignator or PMDesignator, if any. Specify "%t" if the format pattern is not combined with other format patterns.

tt

The AM/PM designator defined in AMDesignator or PMDesignator, if any.

z, %z

The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will not have a leading zero. For example, Pacific Standard Time is "-8". Specify "%z" if the format pattern is not combined with other format patterns.

zz

The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will have a leading zero. For example, Pacific Standard Time is "-08".

zzz

The full time zone offset ("+" or "-" followed by the hour and minutes). Single-digit hours and minutes will have leading zeros. For example, Pacific Standard Time is "-08:00".

:

The default time separator defined in TimeSeparator.

/

The default date separator defined in DateSeparator.

% c

Where c is a format pattern if used alone. That is, to use format pattern "d", "f", "F", "h", "m", "s", "t", "y", "z", "H", or "M" by itself, specify "%d", "%f", "%F", "%h", "%m", "%s", "%t", "%y", "%z", "%H", or "%M".

The "%" character can be omitted if the format pattern is combined with literal characters or other format patterns.

\ c

Where c is any character. Displays the character literally. To display the backslash character, use "\\".


Sacado de Mocosoft

Etiquetas:

jueves, diciembre 22, 2005

Parser Error: Ambiguous match found.

Cuando se tiene un control con una collection con indices de tipo int y string, se genera este mensaje de error al renderear el control.

La solución es crear un solo indexador que reciba un object y escribir código para verificar si es string o int y acceder a la collection.


Ver detalles en Mocosoft

Etiquetas: ,

martes, diciembre 13, 2005

Como cancelar el evento de un Boton

Setear un onclick del lado del servidor

Button1.Attributes.Add("onclick", "return funcion()");

donde "funcion" es una function JavaScript que devuelve true o false anulando el evento del lado del servidor.


Etiquetas:

viernes, diciembre 09, 2005

Report Services no activado

Try manually activating Reporting Services locally on the Reporting Server:

C:\Program Files\Microsoft SQL Server\80\Tools\Binn>RSActivate.exe -c "c:\Program Files\Microsoft SQL Server\MSSQL\Reporting Services\ReportServer\RSReportServer.config" -t

If you get:

Failure starting the web service:
System.Exception: The local NT Service is not activated
at Microsoft.ReportingServices.RSActivate.RSActivate.RpcActivateService(Int32 clientType)
at Microsoft.ReportingServices.RSActivate.RSActivate.InstanceMain()
at Microsoft.ReportingServices.BaseCmdLine.CommandLineMain(String[] args, BaseCmdLine instance)

Try deleting the encrypted key values in the RS database:

rskeymgmt -d

Etiquetas:

martes, diciembre 06, 2005

Plug-ins para Firefox

https://addons.mozilla.org/extensions/?application=firefox/

Etiquetas:

Plug-ins para Firefox

https://addons.mozilla.org/extensions/?application=firefox/

Etiquetas:

Habilitar COM de Excel en una aplicación

Type dcomcnfg in Run.Select Microsoft Excel application and click

properties.In this go to security tab.U can see 3 Radio button.

Checked "Use custom access permissions" and go to edit button.Here u

have to add systemname/ASPNET(asp_wp account)(It will be populate

when u click show users) and Administrator.

Same way u have to follow remaining 2 radio buttons.

After that u go to Identity tab and check the "The launching

user".Then run your application.Still if u get access denied or

system throw error change the "The launching user" to "The

interactive user".