473,322 Members | 1,232 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,322 software developers and data experts.

working with Date and Time

103 100+
Hi all,
I would like to work with the various formats of displaying date and time.

Please help me...

Thanks and regards,

Mathew
Oct 9 '07 #1
4 1205
debasisdas
8,127 Expert 4TB
Question Moved to SQL Server Forum.
Oct 10 '07 #2
iburyak
1,017 Expert 512MB
Your question is not specific enough. If you want for example format date and time in VB6 you should use Format function.

If you want to use format on SQL server side use Convert function see 2 examples below. Third parameter is style which controls what format outputted date will be. For full list of available styles, go to Transact SQL help and view Convert function article.

select convert (varchar(20), getdate(), 103)
select convert (varchar(20), getdate(), 126)

Good Luck.
Oct 10 '07 #3
ck9663
2,878 Expert 2GB
in my opinion, handling of display formatting should be handled on the front-end side of the application, not in the back-end...

is it more efficient to handle it in db-side?
Oct 10 '07 #4
iburyak
1,017 Expert 512MB
Whatever you can handle on DB side provides you more flexibility and speed.
If you need to change something, changes on DB side much easier then doing changes on a front end and facing application distribution to all users. Also DB side is always faster.

It is probably matter of skills in some cases. Some people don't even know what can be done on DB side and use front end for most programming due to lock of skills.

For many programmers it is easier to hardcode something then to read it from a table but to change this hardcode requires application redistribution versus changing values in a table takes seconds of your time.
Oct 10 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Treetop | last post by:
I cannot get this array to work. I want to have the game listed until the day after the event, then come off the list. function events() { var today = new Date(); var dayarray=new...
2
by: wireless200 | last post by:
I've got a table with some datetime fields in it. One field (call it field 1) is of the form mm/dd/yyyy and the other two (fields 2 and 3) are in the form of hh:mm:ss:xx where xx is hundreths of...
3
by: | last post by:
Hello, I am hoping someone else has thought about a date time calculation i need to perform. I would like to be able to calculate the number of "working minutes" between 2 dates, given my...
2
by: Trevor | last post by:
Argh! This problem is driving me nuts! Can you help? In November of 2003, I installed a web service on Windows Server 2003 built in VB.NET for v1.1.4322 of the framework. It contains a timer...
4
by: blini | last post by:
Helo.... How I can convert string "26/03/2006 15:51" for a date? I need to convert and to compare if "09/06/2006 14:20" is lesser or equal that the current date. Everything in Javascript.
2
by: Rob Roberts | last post by:
I have a GridView that is bound to a collection of DateTimes (i.e. - Collection<DateTime>). I have a BoundField in the GridView, and its DataField is set to the DateTime's Date property, and the...
3
by: cj | last post by:
If I want to check to see if it's after "11:36 pm" what would I write? I'm sure it's easy but I'm getting tired of having to work with dates and times. Sometimes I just want time or date. And...
25
by: cmd | last post by:
Hi all, I wanted to rule out other possibilities before suggesting a memory upgrade for a user who owns a Dell Inspiron 6000 laptop with 512 MB of ram. I have a report based on a parameters...
1
by: plaforest | last post by:
Hello All, Thank you for your thoughtful consideration. I am running Access 2000 (9.0.3821 SR-1) This query works: SELECT , FROM table1
6
by: Mike Copeland | last post by:
I am working with a file of data that contains "time values" (e.g. "1225365563"), and I want to convert this data into something I can use in a program I'm developing. From what I've read about...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.