Showing posts with label datepicker. Show all posts
Showing posts with label datepicker. Show all posts

Thursday, March 8, 2012

Date Formate in SQL2005 Reporting

Hi,

iam using a datepicker to pass the parameter "From Date" the datepicker date formate ismm/dd/yyyy but i want to change dis todd/mm/yyyyformate.

wat to change to get my requeriment.

Thxs in advance.

HI

Try this in c#

DateTime datetime = new DateTime();
datetime = DateTime.Parse(month.ToString());
string[] monthname = datetime.GetDateTimeFormats();
date= monthname[6].toString();

|||

Thxs karthikeyan for ur quick reply, but i asked for SSRS

|||

Use dd/MM/yyyy as the format in the Field. Make sure ds and ys are lowercase, Ms are uppercase.

|||

This should give you a good start in using custom expressions in SSRS. It may be C#, but it is still SSRS.

http://msdn2.microsoft.com/en-us/library/ms155798.aspx

|||

if your input parameters to the report go through a stored procedure, then you can check the dates and cobnvert them into any format or transpose them as necessary inside the sql server stored procedure using datepart() and datename() functions.

|||

actually i used the datepicker in the report.....iam displaying this parameter in the report like "Employess from this date to this" but the datepicker date formate is "MM/dd/YYYY"

i want to change this to "dd/mm/yyyy"...i have 2 write code in da report.

Thxs.

Wednesday, March 7, 2012

Date format in ms sql

I have computer with Serbian standards and formats (Regional Settings).

I use datepicker control to select date, but when I try to insert it into database (DatePicker1.Value) it throws error.

What should I set up in order to be able to insert date into ms sql 2000 database, without having to change Regional settings?

This is last question for tonightSmile [:)]

Thanks,
Milan

If you use parameters, rather than trying to build up the SQL INSERT into a string.

http://aspnet101.com/aspnet101/tutorials.aspx?id=1

|||Very simple. nice and clean solution.

You just make me close bunch of open browser tabs and windows with Google's resultsWink [;)]

Thanks a lot.