| Author |
Topic |
|
leahsmart
Posting Yak Master
133 Posts |
Posted - 2003-11-11 : 07:31:59
|
| Hi Reader,I am currently sending data to Flash 2004 and need my date to be in a specific format for flash to except it in it's DateField component. I need to send a date with the format of 'Tue Nov 4 00:00:00 GMT+0000 2003' do you know how do do this?? How can I get the day name?Any help would be great.Leah |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2003-11-11 : 10:03:09
|
| declare @date datetimeselect @date = getdate()select @dateselect datename(dw,@date)This gives the day name. You can use a left,3 and datepart function to format the entire date. Just wrap the entire thing in a function and you should be good to go.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
Amethystium
Aged Yak Warrior
701 Posts |
Posted - 2003-11-11 : 10:03:42
|
| What this bit is suppose to mean :'GMT+0000 2003'My guess is you're sending the time-zone as well as the year?__________________Make love not war! |
 |
|
|
leahsmart
Posting Yak Master
133 Posts |
Posted - 2003-11-11 : 10:29:26
|
| Thanks, that works great :) |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2003-11-11 : 10:30:48
|
| GMT +0000 just means that it is the GMT with no variation. The getutcdate() function will give you this datetime.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
leahsmart
Posting Yak Master
133 Posts |
Posted - 2003-11-11 : 10:32:17
|
| Hummm, still does not work, what does this flash component want!!!! |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-11-11 : 12:14:39
|
| Have a look at CONVERT in SQL Server Books Online. Using that along with the DATEPART commands, you can build the required datetime format.Tara |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-11-11 : 12:49:25
|
| Flash scripting is based on JavaScript/ECMAScript, and that date format is the standard used by those languages. It is pretty aggravating to deal with, that's for sure.You may want to consider passing the date as a string and converting it on the Flash side. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2003-11-11 : 15:39:54
|
| Leah,I wonder if it's expecting a comma string. There are some JS based components that need to have:datepart(yy,@date) + ',' + datepart(mm,@date) + ',' + datepart(dd,@date)This is kind of stupid, but worth a try.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
leahsmart
Posting Yak Master
133 Posts |
Posted - 2003-11-12 : 04:28:58
|
| Thanks for the help, have tried sending it as that before but it is no good. Maybe I should just stick to a good old text field :) |
 |
|
|
|