Answered by:
Date Time Format problem

Question
-
User2067508032 posted
Hi Experts/Members
I have a prob here which is to sub-string the date.
My current data is like this '10 May 13/10:33' in normal .I using with this query.
select convert(varchar(20),day(date),100) + ' '+ REPLACE(RIGHT(CONVERT(VARCHAR(9), date, 6), 6), ' ', ' ') +'/'+ REPLACE(RIGHT(CONVERT(VARCHAR(5), date, 8), 8), ' ', '') as [Time] from record where id='16145'
I tried this but the output from Indonesia seems like incorrect '10 maj 13/10:33'
Kindly provide some advice.. Appreciate for the helpWednesday, May 15, 2013 11:44 PM
Answers
-
User2067508032 posted
Finally, can solve.
Microsoft SQL server managment studio then to login default language must be English . Thank for help me .
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, May 16, 2013 2:15 AM
All replies
-
User-1598965247 posted
'10 maj 13/10:33'maj is the May month of some other language.
check this query, you ll get idea
Select * from sys.syslanguages where shortmonths like '%maj%'
Thursday, May 16, 2013 12:14 AM -
User2067508032 posted
Thanks you heyitsme. I have to check also culture info.
But I dont know why?? ;-(
Thursday, May 16, 2013 12:25 AM -
User-1598965247 posted
what exactly is your requirement. can you make it bit clear?
Thursday, May 16, 2013 12:27 AM -
User-1716253493 posted
I sugest you to format it in aspx page instead sql
DataFormatString="{0:dd MMM yy/hh:mm}"
or
Label.Text=yourdate.ToString("dd MMM yy/hh:mm")
Thursday, May 16, 2013 12:32 AM -
User2067508032 posted
My problem is when they run my program at Indonesia server month is change.That all :D
Thursday, May 16, 2013 12:37 AM -
User-1598965247 posted
you can execute this query which will change the language to engish
set language english
Thursday, May 16, 2013 12:42 AM -
User2067508032 posted
I aldy done my dear ;-(
Thursday, May 16, 2013 12:43 AM -
User-1716253493 posted
set page uiculture="id-ID"Thursday, May 16, 2013 1:12 AM -
User2067508032 posted
pls explain me I dont understand
set page uiculture="id-ID"
Thursday, May 16, 2013 1:49 AM -
User-1716253493 posted
set at top your page
<%@ Page Culture="string" UICulture="string" ...
or globalization web.config
<globalization culture="string" uiCulture="string"/>
http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo(v=vs.71).aspx
http://msdn.microsoft.com/en-us/library/bz9tc508(v=vs.100).aspx
Thursday, May 16, 2013 2:11 AM -
User2067508032 posted
Finally, can solve.
Microsoft SQL server managment studio then to login default language must be English . Thank for help me .
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, May 16, 2013 2:15 AM