473,414 Members | 1,623 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

int'l date

I'm trying to use the time & date method for get it shown on te page,
but if i use the standadr format it works, while if i change it as
follow, i get two error messages:

System.Globalization.CultureInfo culture = new
System.Globalization.CultureInfo();
System.Globalization.CultureInfo("pl-PL");

LabelData.Text = String.Format(culture.DateTimeFormat,"Today is
{0:dd}, {0:MMMM} {0:yyyy}, {0:HH} {0:mm} {0:ss}", DateTime.Now);
The errors are:
- No overload for method 'CultureInfo' takes '0' arguments;
-'System.Globalization.CultureInfo' is a 'type', which is not valid in
the given context;
What should i change to make it working properly?

Thanks

Oct 3 '07 #1
1 1606
vinnie wrote:
I'm trying to use the time & date method for get it shown on te page,
but if i use the standadr format it works, while if i change it as
follow, i get two error messages:

System.Globalization.CultureInfo culture = new
System.Globalization.CultureInfo();
System.Globalization.CultureInfo("pl-PL");

LabelData.Text = String.Format(culture.DateTimeFormat,"Today is
{0:dd}, {0:MMMM} {0:yyyy}, {0:HH} {0:mm} {0:ss}", DateTime.Now);
The errors are:
- No overload for method 'CultureInfo' takes '0' arguments;
-'System.Globalization.CultureInfo' is a 'type', which is not valid in
the given context;
What should i change to make it working properly?

Thanks
Use the CultureInfo.GetCulture(string name) method or new
CultureInfo(string name) constructor.
System.Globalization.CultureInfo culture = new
System.Globalization.CultureInfo("pl-PL");
//System.Globalization.CultureInfo("pl-PL");
JB
Oct 4 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: lkrubner | last post by:
All the timestamps in my code are wrong by 90 minutes. date INT(11), I'd like to add 5400 to every date field in my database. Rather than do this in PHP, I'm wondering if MySql has a command...
3
by: Rakesh | last post by:
In my Python code fragment, I want to write a code fragment such that the minimum element of a tuple is subtracted from all the elements of a given tuple. When I execute the following python...
3
by: thomasamillergoogle | last post by:
Hello, I have a table that unfortunatley has a field 'DateSold' with datatype of int that SHOULD be datetime. So, I am trying to do a cast/convert. The int is stored as 20040520 (which means...
7
by: Bostonasian | last post by:
I have a table that contains transactional data. Such as site view by whom, when, which template, etc, etc... Everytime when I pulled the report, hh:mm:ss never matters. Only breakdown by dates,...
7
by: Erik Cato | last post by:
Hi group! Anyone know a way to convert the __DATE__ predefined macro into a unsigned int representing the current date? It should be possible to make out what date it was from the beginning. My...
9
by: ritchie | last post by:
Hello, Just wondering if anyone could help me with a basic C string-parsing question. I have an Integer date ie: YYYYMMDD. I can convert it into a string but I want to break it down to: Int...
17
by: Terry Jolly | last post by:
New to C# ---- How do I convert a Date to int? In VB6: Dim lDate as long lDate = CLng(Date) In C#
12
by: blast | last post by:
hi , i have a problem, here is the issue.... i have table with date stored as int.....say for eg : date: 11/30/2006 time:09:15 am is stored in the table as 1164896114 now i need to compare...
0
by: ravinder1983 | last post by:
Hi All This is the first time I am posting something on discussion. Hopefully I will receive an answer. In MySQL 4.1 I have dates field like start date, close date etc which are of data type...
5
by: Artie | last post by:
Hi, I have a date field stored as an INT and need to convert to a date format mm/dd/yyyy. I'm having trouble determining what the starting date is. min(date) = 730395 max(date) = 733189 ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.