Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Variable for DNN Date/TimeVariable for DNN Date/Time
Previous
 
Next
New Post
8/23/2006 1:31 PM
 

Hello,

Can someone tell me the variable for DNN date/time that could be used either to write it to a database or present it on the page?

Thanks!

 
New Post
8/23/2006 4:53 PM
 
radcoder2 wrote

Hello,

Can someone tell me the variable for DNN date/time that could be used either to write it to a database or present it on the page?

Thanks!



Do you mean the web server's current date & time?

Try using System.DateTime.Now .. eg

VB: Dim myDate as System.DateTime = System.DateTime.Now
C#: DateTime myDate = DateTime.Now;

JK

You know your website is cool, so why not let your users help you by spreading the word on social networking sites - get the DotNetNuke Social Bookmarks Module with 57 different ways to add social bookmarks to your site ... or download the FREE demo right now
 
New Post
8/23/2006 6:01 PM
 

If you are talking how to do this in code then:

in vb.net you can use:   Now().ToLongTimeString or Now().ToShortTimeString

in sql server you can use:   getdate()

or you might check out our dbHTML and ActiveHTML modules at Brillnat.com  They are text HTML modules that allow you to display information from a database.  The dbHTML module allows you to place tokens (or tags) in your HTML that is replaced with system values or database values or querystring values. 

In dbHTML to display the system date/time you would just add [sys:LongDate] to get the date like "Wednesday, August 16, 2006", [sys:ShortDate] to get "8/16/2006", [sys:LongTime], [sys:ShortTime] ....

mj


Michael Jackson
Brillnat.com
Custom module development
Database access tokenized HTML modules
 
New Post
8/24/2006 3:17 AM
 

Does anyone else realize that the current version of the text/HTML module allows you to enter [DATE], [TIME] and [PORTAL.NAME] and they will be replaced with the appropriate values?

I dodn't know that until tonight. 

mj


Michael Jackson
Brillnat.com
Custom module development
Database access tokenized HTML modules
 
New Post
8/24/2006 9:18 AM
 

 

I have to admit that I did not know that.

Thanks for sharing!


DotNetNuke Modules from Snapsis.com
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Variable for DNN Date/TimeVariable for DNN Date/Time


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out