![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All! Is there a way in Date Time String Transformation Properties to convert the time format to 24H? I have tried all the date format but i don't see any 24H format. Please help. Thanks |
#3
| |||
| |||
|
|
Hi If you are storing the information in a datetime datatype then you can choose the display format when retrieving the data using the convert command. If this is a character data type then you would have to specify the format of the input such as yyyy-mm-dd hh:sstt and the format of the output as yyyy-mm-dd HH:ss. (as HH is 24 hour format). Although there are some formats already available in the dropdown list, you can always type in your own. John "Joel Gacosta" <joel (AT) bluemediacomm (DOT) com> wrote in message news:eDCuiIRSDHA.2316 (AT) tk2msftngp13 (DOT) phx.gbl... Hi All! Is there a way in Date Time String Transformation Properties to convert the time format to 24H? I have tried all the date format but i don't see any 24H format. Please help. Thanks |
#4
| |||
| |||
|
|
I don't think you fully understood what John was saying. SQL Server doesn't store the date and time information as you visually see it. It always knows what is AM and what is PM when it is stored. You don't need to convert it as 24 hour format before inputting the data since sql server also knows about AM and PM in the input string. You must have that information there otherwise how would you know which ones to add 12 hours to in order to convert to military time? -- Andrew J. Kelly SQL Server MVP "Joel Gacosta" <joel (AT) bluemediacomm (DOT) com> wrote in message news:ecAcOPSSDHA.3144 (AT) tk2msftngp13 (DOT) phx.gbl... Great! I must format the input source into 24H first before i can have the output in 24H else i would stuck in 12H even if I specify the output format as HH:mm:ss. Thanx! joel "John Bell" <jbellnewsposts (AT) hotmail (DOT) com> wrote in message news:3f11226d$0$18761$afc38c87 (AT) news (DOT) easynet.co.uk... Hi If you are storing the information in a datetime datatype then you can choose the display format when retrieving the data using the convert command. If this is a character data type then you would have to specify the format of the input such as yyyy-mm-dd hh:sstt and the format of the output as yyyy-mm-dd HH:ss. (as HH is 24 hour format). Although there are some formats already available in the dropdown list, you can always type in your own. John "Joel Gacosta" <joel (AT) bluemediacomm (DOT) com> wrote in message news:eDCuiIRSDHA.2316 (AT) tk2msftngp13 (DOT) phx.gbl... Hi All! Is there a way in Date Time String Transformation Properties to convert the time format to 24H? I have tried all the date format but i don't see any 24H format. Please help. Thanks |
#5
| |||
| |||
|
|
Sorry i forgot to tell you that i'm converting from a character data type and not a datetime data type. ciao "Andrew J. Kelly" <sqlmvpnooospam (AT) shadhawk (DOT) com> wrote in message news:OL7HlFTSDHA.940 (AT) TK2MSFTNGP11 (DOT) phx.gbl... I don't think you fully understood what John was saying. SQL Server doesn't store the date and time information as you visually see it. It always knows what is AM and what is PM when it is stored. You don't need to convert it as 24 hour format before inputting the data since sql server also knows about AM and PM in the input string. You must have that information there otherwise how would you know which ones to add 12 hours to in order to convert to military time? -- Andrew J. Kelly SQL Server MVP "Joel Gacosta" <joel (AT) bluemediacomm (DOT) com> wrote in message news:ecAcOPSSDHA.3144 (AT) tk2msftngp13 (DOT) phx.gbl... Great! I must format the input source into 24H first before i can have the output in 24H else i would stuck in 12H even if I specify the output format as HH:mm:ss. Thanx! joel "John Bell" <jbellnewsposts (AT) hotmail (DOT) com> wrote in message news:3f11226d$0$18761$afc38c87 (AT) news (DOT) easynet.co.uk... Hi If you are storing the information in a datetime datatype then you can choose the display format when retrieving the data using the convert command. If this is a character data type then you would have to specify the format of the input such as yyyy-mm-dd hh:sstt and the format of the output as yyyy-mm-dd HH:ss. (as HH is 24 hour format). Although there are some formats already available in the dropdown list, you can always type in your own. John "Joel Gacosta" <joel (AT) bluemediacomm (DOT) com> wrote in message news:eDCuiIRSDHA.2316 (AT) tk2msftngp13 (DOT) phx.gbl... Hi All! Is there a way in Date Time String Transformation Properties to convert the time format to 24H? I have tried all the date format but i don't see any 24H format. Please help. Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |