Firebird SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesFirebird SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 18th, 2005, 11:06 AM
meadow meadow is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 16 meadow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 54 m 19 sec
Reputation Power: 0
DATE_FORMAT in Firebird?

Is there another name for the DATE_FORMAT function in Firebird, or is it a UDF? thanks

Reply With Quote
  #2  
Old August 19th, 2005, 03:54 AM
IvanP IvanP is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 12 IvanP User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 7 m 37 sec
Reputation Power: 0
Quote:
Originally Posted by meadow
Is there another name for the DATE_FORMAT function in Firebird, or is it a UDF? thanks


What exactly are you asking ? Whether Firebird has some built-in function for formatting dates ? No, formatting is normally done on client.

However, you can either CAST date to varchar (in which case you do not have the chioce of formatting details, the result will always be yyyy-mm-dd), or you can use built-in function EXTRACT to decompose date to its parts (day, month, year) and then put them together the way you like.

Ivan

Reply With Quote
  #3  
Old August 19th, 2005, 07:11 PM
meadow meadow is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2005
Posts: 16 meadow User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 54 m 19 sec
Reputation Power: 0
Quote:
Originally Posted by IvanP
What exactly are you asking ? Whether Firebird has some built-in function for formatting dates ? No, formatting is normally done on client.

However, you can either CAST date to varchar (in which case you do not have the chioce of formatting details, the result will always be yyyy-mm-dd), or you can use built-in function EXTRACT to decompose date to its parts (day, month, year) and then put them together the way you like.

Ivan


Thank You! EXTRACT might be what i look for then =) in MySQL there is a function called FORMAT_DATE where you can decompose date into pats =) and just choose which parts and how you want to return em =) but EXTRACT will do just fine i guess, thanks

Reply With Quote
  #4  
Old November 7th, 2005, 05:21 AM
XOCR XOCR is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2005
Posts: 2 XOCR User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 42 m 2 sec
Reputation Power: 0
system date value

i need to know how to obtain de system date value
¿wich is the command?
-ex. in SQLServer is getdate()-



and, the command to transform a number to date?
-ex. 2005-int to 2005like year-



can anybody help me?

Reply With Quote
  #5  
Old November 7th, 2005, 09:16 AM
fikret fikret is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Sarajevo, Bosnia
Posts: 111 fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level)fikret User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 1 Day 5 h 32 m 19 sec
Reputation Power: 8
Quote:
Originally Posted by XOCR
i need to know how to obtain de system date value
¿wich is the command?
-ex. in SQLServer is getdate()-



and, the command to transform a number to date?
-ex. 2005-int to 2005like year-



can anybody help me?


Try current_date, current_time...

--
Best regards,
Fikret Hasovic http://fikret.fbtalk.net
USAID TAMP Senior Programmer

* Firebird Foundation member.
- Join today at http://www.firebirdsql.org/ff/foundation
* JEDI VCS contributor
http://jedivcs.sourceforge.net/
* Firebird and Fyracle news
http://www.fyracle.org

Reply With Quote
  #6  
Old November 8th, 2005, 02:44 AM
SilverDB's Avatar
SilverDB SilverDB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Romania
Posts: 173 SilverDB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 45 m 53 sec
Reputation Power: 5
Send a message via Yahoo to SilverDB
Quote:
Originally Posted by fikret
Try current_date, current_time...

--
Best regards,
Fikret Hasovic http://fikret.fbtalk.net
USAID TAMP Senior Programmer

* Firebird Foundation member.
- Join today at http://www.firebirdsql.org/ff/foundation
* JEDI VCS contributor
http://jedivcs.sourceforge.net/
* Firebird and Fyracle news
http://www.fyracle.org


or you can use NOW.
__________________
If i've been helpful, please add to my reputation.
My unfinished site: http://www.dever.ro

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesFirebird SQL Development > DATE_FORMAT in Firebird?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT